path traversal issue: Ignore trailing simple quotes

This commit is contained in:
Alexandre Aubin 2021-08-16 14:02:37 +02:00 committed by GitHub
parent 8fb895d258
commit 1ef85021d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -887,7 +887,7 @@ class Configurations(TestSuite):
# means that the app is not using the standard nginx # means that the app is not using the standard nginx
# helper, and therefore it is likely to be replaced by # helper, and therefore it is likely to be replaced by
# something ending with / ... # something ending with / ...
if not location.endswith("/") \ if not location.strip("'").endswith("/") \
and (alias_path.endswith("/") or "__FINALPATH__" not in alias_path): and (alias_path.endswith("/") or "__FINALPATH__" not in alias_path):
yield location yield location