From 1ef85021d4f0c54abce5bdf8e3c74454ac0998a9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 16 Aug 2021 14:02:37 +0200 Subject: [PATCH] path traversal issue: Ignore trailing simple quotes --- package_linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index 68cbec7..b844377 100755 --- a/package_linter.py +++ b/package_linter.py @@ -887,7 +887,7 @@ class Configurations(TestSuite): # means that the app is not using the standard nginx # helper, and therefore it is likely to be replaced by # something ending with / ... - if not location.endswith("/") \ + if not location.strip("'").endswith("/") \ and (alias_path.endswith("/") or "__FINALPATH__" not in alias_path): yield location