mirror of https://gitlab.com/bashrc2/epicyon
More general test for authorized paths
parent
f1e3a2591c
commit
4899fdea28
14
daemon.py
14
daemon.py
|
@ -1264,13 +1264,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
def _isAuthorized(self) -> bool:
|
def _isAuthorized(self) -> bool:
|
||||||
self.authorizedNickname = None
|
self.authorizedNickname = None
|
||||||
|
|
||||||
if self.path.startswith('/icons/') or \
|
notAuthPaths = (
|
||||||
self.path.startswith('/avatars/') or \
|
'/icons/', '/avatars/', '/favicon.ico', '/newswire.xml',
|
||||||
self.path.startswith('/favicon.ico') or \
|
'/newswire_favicon.ico', '/categories.xml'
|
||||||
self.path.startswith('/newswire_favicon.ico') or \
|
)
|
||||||
self.path.startswith('/categories.xml') or \
|
for notAuthStr in notAuthPaths:
|
||||||
self.path.startswith('/newswire.xml'):
|
if self.path.startswith(notAuthStr):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# token based authenticated used by the web interface
|
# token based authenticated used by the web interface
|
||||||
if self.headers.get('Cookie'):
|
if self.headers.get('Cookie'):
|
||||||
|
|
Loading…
Reference in New Issue