Skip to content

Fix incorrect regex used in FileUploader#extract_dynamic_path

What does this MR do?

We use upload.path for the fallback, and the matching regex has a / in the beginning, however, upload.path is relative, so it won't match them. This MR changes the regex to cover absolute and relative paths.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related issues

Closes #217602 (closed)

Closes #215991 (closed)

Closes #217585 (closed)

Edited by Yorick Peterse

Merge request reports

Loading