mirror of https://gitlab.com/bashrc2/epicyon
Handle invalid well-known path
parent
60e5a1d5ba
commit
825f8e2f1b
7
utils.py
7
utils.py
|
@ -5535,9 +5535,10 @@ def check_bad_path(path: str):
|
||||||
bad_strings = ('..', '/.', '%2e%2e', '%252e%252e')
|
bad_strings = ('..', '/.', '%2e%2e', '%252e%252e')
|
||||||
|
|
||||||
# allow /.well-known/...
|
# allow /.well-known/...
|
||||||
if '/.' in path_lower and \
|
if '/.' in path_lower:
|
||||||
path_lower.startswith('/.well-known/'):
|
if path_lower.startswith('/.well-known/') or \
|
||||||
bad_strings = ('..', '%2e%2e', '%252e%252e')
|
path_lower.startswith('/users/.well-known/'):
|
||||||
|
bad_strings = ('..', '%2e%2e', '%252e%252e')
|
||||||
|
|
||||||
if string_contains(path_lower, bad_strings):
|
if string_contains(path_lower, bad_strings):
|
||||||
print('WARN: bad path ' + path)
|
print('WARN: bad path ' + path)
|
||||||
|
|
Loading…
Reference in New Issue