sort key, refine log
This commit is contained in:
parent
d1f64de6b4
commit
c48190fe7a
2 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ class MuMgr(object):
|
||||||
|
|
||||||
def userinfo(self, user):
|
def userinfo(self, user):
|
||||||
ret = ""
|
ret = ""
|
||||||
for key in user.keys():
|
for key in sorted(user):
|
||||||
if key in ['enable']:
|
if key in ['enable']:
|
||||||
continue
|
continue
|
||||||
ret += '\n'
|
ret += '\n'
|
||||||
|
|
|
@ -141,13 +141,13 @@ class client_queue(object):
|
||||||
self.re_enable(connection_id)
|
self.re_enable(connection_id)
|
||||||
self.update()
|
self.update()
|
||||||
if connection_id < self.front:
|
if connection_id < self.front:
|
||||||
logging.warn('obfs auth: duplicate id')
|
logging.warn('obfs auth: deprecated id, someone replay attack')
|
||||||
return False
|
return False
|
||||||
if connection_id > self.front + 0x4000:
|
if connection_id > self.front + 0x4000:
|
||||||
logging.warn('obfs auth: wrong id')
|
logging.warn('obfs auth: wrong id')
|
||||||
return False
|
return False
|
||||||
if connection_id in self.alloc:
|
if connection_id in self.alloc:
|
||||||
logging.warn('obfs auth: duplicate id 2')
|
logging.warn('obfs auth: duplicate id, someone replay attack')
|
||||||
return False
|
return False
|
||||||
if self.back <= connection_id:
|
if self.back <= connection_id:
|
||||||
self.back = connection_id + 1
|
self.back = connection_id + 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue