Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
11617:9f10adb70a04 | 11618:83070a9cd526 |
---|---|
91 self.lock.release() | 91 self.lock.release() |
92 sys.exit(0) | 92 sys.exit(0) |
93 | 93 |
94 def serve_one(self): | 94 def serve_one(self): |
95 cmd = self.fin.readline()[:-1] | 95 cmd = self.fin.readline()[:-1] |
96 if cmd and not wireproto.dispatch(self.repo, self, cmd): | 96 if cmd and cmd in wireproto.commands: |
97 wireproto.dispatch(self.repo, self, cmd) | |
98 elif cmd: | |
97 impl = getattr(self, 'do_' + cmd, None) | 99 impl = getattr(self, 'do_' + cmd, None) |
98 if impl: | 100 if impl: |
99 r = impl() | 101 r = impl() |
100 if r is not None: | 102 if r is not None: |
101 self.respond(r) | 103 self.respond(r) |