We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
..
dolibarr/htdocs/document.php
Lines 254 to 260 in 583480e
I have an invoice that comes from outside and has a ref like XXXXX. so the created file is XXXXX..pdf and .. gets caught.
XXXXX.
XXXXX..pdf
Could I change it to (?:^|[\/\\\\])\.\.(?:[\/\\\\]|$)
(?:^|[\/\\\\])\.\.(?:[\/\\\\]|$)
to catch only .. that are meant for path traversal?
/path/to/file ../relative/path ..\\another\\path C:\\Windows\..\System32/..//././../ file/in/directory/with/.. file\\in\\directory\\with\\.. INVOICE..pdf file/with/no/../dots directory\\with\\no\\dots
No response
The text was updated successfully, but these errors were encountered:
Which version?
Sorry, something went wrong.
The linked code is from develop branch
Sorry, I didn't realize it was a link, I thought it was a screenshot.
Regarding your fix you have a +1 from me.
No branches or pull requests
Bug
dolibarr/htdocs/document.php
Lines 254 to 260 in 583480e
I have an invoice that comes from outside and has a ref like
XXXXX.
so the created file isXXXXX..pdf
and..
gets caught.Could I change it to
(?:^|[\/\\\\])\.\.(?:[\/\\\\]|$)
to catch only
..
that are meant for path traversal?Dolibarr Version
No response
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered: