diff mercurial/sshserver.py @ 11618:83070a9cd526

protocol: command must be checked before passing in
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 16 Jul 2010 19:01:34 +0200
parents 47ca289a3a08
children e46a8b2331a6
line wrap: on
line diff
--- a/mercurial/sshserver.py	Tue Jul 20 10:05:30 2010 +0200
+++ b/mercurial/sshserver.py	Fri Jul 16 19:01:34 2010 +0200
@@ -93,7 +93,9 @@
 
     def serve_one(self):
         cmd = self.fin.readline()[:-1]
-        if cmd and not wireproto.dispatch(self.repo, self, cmd):
+        if cmd and cmd in wireproto.commands:
+            wireproto.dispatch(self.repo, self, cmd)
+        elif cmd:
             impl = getattr(self, 'do_' + cmd, None)
             if impl:
                 r = impl()