From c48190fe7a01738fd9b26c668ec5e7313be7598e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Tue, 11 Oct 2016 15:16:08 +0800 Subject: [PATCH] sort key, refine log --- mujson_mgr.py | 2 +- shadowsocks/obfsplugin/auth.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mujson_mgr.py b/mujson_mgr.py index d7a810a..bbc8d3f 100644 --- a/mujson_mgr.py +++ b/mujson_mgr.py @@ -64,7 +64,7 @@ class MuMgr(object): def userinfo(self, user): ret = "" - for key in user.keys(): + for key in sorted(user): if key in ['enable']: continue ret += '\n' diff --git a/shadowsocks/obfsplugin/auth.py b/shadowsocks/obfsplugin/auth.py index 3d82c93..a720065 100644 --- a/shadowsocks/obfsplugin/auth.py +++ b/shadowsocks/obfsplugin/auth.py @@ -141,13 +141,13 @@ class client_queue(object): self.re_enable(connection_id) self.update() if connection_id < self.front: - logging.warn('obfs auth: duplicate id') + logging.warn('obfs auth: deprecated id, someone replay attack') return False if connection_id > self.front + 0x4000: logging.warn('obfs auth: wrong id') return False if connection_id in self.alloc: - logging.warn('obfs auth: duplicate id 2') + logging.warn('obfs auth: duplicate id, someone replay attack') return False if self.back <= connection_id: self.back = connection_id + 1