Skip to content

Sanitize bucket name in preg_match #37

@mzur

Description

@mzur

The bucket name is used as-is in the regular expression to check if it is included in the endpoint. We had a unhandled error when it included a /. Sanitize the bucket name or use a different method than preg_match (e.g. Str::startsWith, Str::endsWith).

if (!preg_match("/(\/\/{$bucket}\.|[a-zA-Z]\/{$bucket}($|\/))/", $endpoint)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Medium Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions