Skip to content

Path validation of sql parameter in mysql::db too restrictive. #1499

Closed
@rwf14f

Description

@rwf14f

Describe the Bug

The regex that is used by mysql::db to validate the sql parameter refuses to accept perfectly valid pathnames, eg it only accepts a single dot to separate the filename from the extensions, but not anywhere else in the path. In our case it's the powerdns mysql schema path that it's choking on: /usr/share/doc/pdns-backend-mysql-4.1.14/schema.mysql.sql.

Is there a reason why the module doesn't use the types from stdlib (Optional[Array[Stdlib::Unixpath]] $sql = undef,)? The module has a dependency on it already. Are you worried about whitespaces in paths ?

Expected Behavior

The module should allow all valid paths.

Steps to Reproduce

Use paths with a multiple dots in sql parameter.

Environment

  • Version [13.0.0]
  • Platform [CentOS 7]

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions