mirror of https://gitlab.com/bashrc2/epicyon
Extra bad path
parent
0bda305948
commit
bb9af5b860
|
@ -16702,7 +16702,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _check_bad_path(self):
|
def _check_bad_path(self):
|
||||||
if '..' in self.path or '%2e%2e' in self.path or '%2E%2E' in self.path:
|
path_lower = self.path.lower()
|
||||||
|
if '..' in path_lower or \
|
||||||
|
'%2e%2e' in path_lower or \
|
||||||
|
'%252e%252e' in path_lower:
|
||||||
print('WARN: bad path ' + self.path)
|
print('WARN: bad path ' + self.path)
|
||||||
self._400()
|
self._400()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue