mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Fix an edge case of path traversal detection
This commit is contained in:
parent
79c52b28c7
commit
01adf07c5e
1 changed files with 3 additions and 0 deletions
|
@ -526,6 +526,9 @@ class App(TestSuite):
|
||||||
|
|
||||||
for block in nginxconf:
|
for block in nginxconf:
|
||||||
for location, alias in find_location_with_alias(block):
|
for location, alias in find_location_with_alias(block):
|
||||||
|
# Ignore locations which are regexes..?
|
||||||
|
if location.startswith("^") and location.endswith("$"):
|
||||||
|
continue
|
||||||
alias_path = alias[-1]
|
alias_path = alias[-1]
|
||||||
# For path traversal issues to occur, both of those are needed :
|
# For path traversal issues to occur, both of those are needed :
|
||||||
# - location /foo { (*without* a / after foo)
|
# - location /foo { (*without* a / after foo)
|
||||||
|
|
Loading…
Reference in a new issue