]> jfr.im git - irc/quakenet/iauthd.git/commitdiff
Fix: untrusted username should not override trusted username.
authorshroud <redacted>
Thu, 1 Aug 2013 22:20:38 +0000 (00:20 +0200)
committershroud <redacted>
Thu, 1 Aug 2013 22:20:38 +0000 (00:20 +0200)
quakenet-iauthd

index b7b5339bcfba0065a7ccda141893b0c5f7ef53da..3260f28de59f1fbd20865ce5fe3db8cc411105f9 100755 (executable)
@@ -152,7 +152,8 @@ class IAuthHandler(LineDispatcher):
             if command == 'U':
                 username = '~' + username
 
-            self.clients[id]['username'] = username
+            if not 'username' in self.clients[id] or username[0] != '~':
+                self.clients[id]['username'] = username
         elif command == 'D': # client disconnected
             if id in self.clients:
                 del self.clients[id]