forked from indymedia/epicyon
Reserved usernames
parent
fbaf144479
commit
e500d32b15
|
@ -147,7 +147,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
def do_GET(self):
|
||||
if self.server.debug:
|
||||
print('DEBUG: GET from '+self.server.baseDir+' path: '+self.path)
|
||||
print('DEBUG: GET from '+self.server.baseDir+' path: '+self.path+' busy: '+str(self.server.GETbusy))
|
||||
if self.server.GETbusy:
|
||||
currTimeGET=int(time.time())
|
||||
if currTimeGET-self.server.lastGET<10:
|
||||
|
@ -159,8 +159,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.lastGET=currTimeGET
|
||||
self.server.GETbusy=True
|
||||
|
||||
if self.server.debug:
|
||||
print('DEBUG: GET _permittedDir')
|
||||
if not self._permittedDir(self.path):
|
||||
if self.server.debug:
|
||||
print('DEBUG: GET Not permitted')
|
||||
|
@ -258,6 +256,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self._set_headers('application/json')
|
||||
|
||||
def do_POST(self):
|
||||
if self.server.debug:
|
||||
print('DEBUG: POST to from '+self.server.baseDir+' path: '+self.path+' busy: '+str(self.server.POSTbusy))
|
||||
if self.server.POSTbusy:
|
||||
currTimePOST=int(time.time())
|
||||
if currTimePOST-self.server.lastPOST<10:
|
||||
|
|
1
inbox.py
1
inbox.py
|
@ -141,7 +141,6 @@ def runInboxQueue(baseDir: str,httpPrefix: str,personCache: {},queue: [],domain:
|
|||
continue
|
||||
|
||||
pubKey=getPersonPubKey(session,keyId,personCache,debug)
|
||||
print('********* pubkey7825 '+str(pubKey))
|
||||
if pubKey:
|
||||
print('DEBUG: public key: '+str(pubKey))
|
||||
break
|
||||
|
|
|
@ -26,6 +26,9 @@ def createPerson(baseDir: str,nickname: str,domain: str,port: int, \
|
|||
httpPrefix: str, saveToFile: bool,password=None) -> (str,str,{},{}):
|
||||
"""Returns the private key, public key, actor and webfinger endpoint
|
||||
"""
|
||||
reservedNames=['inbox','outbox','followers','following','sharedInbox','publicKey']
|
||||
if nickname in reservedNames:
|
||||
return None,None,None,None
|
||||
privateKeyPem,publicKeyPem=generateRSAKey()
|
||||
webfingerEndpoint= \
|
||||
createWebfingerEndpoint(nickname,domain,port,httpPrefix,publicKeyPem)
|
||||
|
|
Loading…
Reference in New Issue