forked from indymedia/epicyon
Check authorization
parent
373c107d89
commit
87c274dd30
44
daemon.py
44
daemon.py
|
@ -9434,30 +9434,32 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'permitted directory',
|
'permitted directory',
|
||||||
'login shown done')
|
'login shown done')
|
||||||
|
|
||||||
if authorized and htmlGET and '/users/' in self.path and \
|
if htmlGET and '/users/' in self.path and \
|
||||||
self.path.endswith('/newswiremobile'):
|
self.path.endswith('/newswiremobile'):
|
||||||
nickname = getNicknameFromActor(self.path)
|
if (authorized or (not authorized and '/users/news/' in self.path)):
|
||||||
if not nickname:
|
nickname = getNicknameFromActor(self.path)
|
||||||
self._404()
|
if not nickname:
|
||||||
|
self._404()
|
||||||
|
self.server.GETbusy = False
|
||||||
|
return
|
||||||
|
timelinePath = \
|
||||||
|
'/users/' + nickname + '/' + self.server.defaultTimeline
|
||||||
|
showPublishAsIcon = self.server.showPublishAsIcon
|
||||||
|
msg = htmlNewswireMobile(self.server.baseDir,
|
||||||
|
nickname,
|
||||||
|
self.server.domain,
|
||||||
|
self.server.domainFull,
|
||||||
|
self.server.httpPrefix,
|
||||||
|
self.server.translate,
|
||||||
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting,
|
||||||
|
timelinePath,
|
||||||
|
showPublishAsIcon).encode('utf-8')
|
||||||
|
self._set_headers('text/html', len(msg),
|
||||||
|
cookie, callingDomain)
|
||||||
|
self._write(msg)
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
return
|
return
|
||||||
timelinePath = \
|
|
||||||
'/users/' + nickname + '/' + self.server.defaultTimeline
|
|
||||||
showPublishAsIcon = self.server.showPublishAsIcon
|
|
||||||
msg = htmlNewswireMobile(self.server.baseDir,
|
|
||||||
nickname,
|
|
||||||
self.server.domain,
|
|
||||||
self.server.domainFull,
|
|
||||||
self.server.httpPrefix,
|
|
||||||
self.server.translate,
|
|
||||||
self.server.newswire,
|
|
||||||
self.server.positiveVoting,
|
|
||||||
timelinePath,
|
|
||||||
showPublishAsIcon).encode('utf-8')
|
|
||||||
self._set_headers('text/html', len(msg), cookie, callingDomain)
|
|
||||||
self._write(msg)
|
|
||||||
self.server.GETbusy = False
|
|
||||||
return
|
|
||||||
|
|
||||||
if authorized and htmlGET and '/users/' in self.path and \
|
if authorized and htmlGET and '/users/' in self.path and \
|
||||||
self.path.endswith('/linksmobile'):
|
self.path.endswith('/linksmobile'):
|
||||||
|
|
Loading…
Reference in New Issue