# HG changeset patch # User Dirkjan Ochtman # Date 1279299694 -7200 # Node ID 83070a9cd526904fadf6fd4bb1a5754c84bc4fab # Parent 9f10adb70a043bd2daffcf570ed3a8594f93db27 protocol: command must be checked before passing in diff -r 9f10adb70a04 -r 83070a9cd526 mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py Tue Jul 20 10:05:30 2010 +0200 +++ b/mercurial/hgweb/protocol.py Fri Jul 16 19:01:34 2010 +0200 @@ -67,5 +67,5 @@ def call(repo, req, cmd): p = webproto(req) - r = wireproto.dispatch(repo, p, cmd) + wireproto.dispatch(repo, p, cmd) yield p.response diff -r 9f10adb70a04 -r 83070a9cd526 mercurial/sshserver.py --- 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() diff -r 9f10adb70a04 -r 83070a9cd526 mercurial/wireproto.py --- a/mercurial/wireproto.py Tue Jul 20 10:05:30 2010 +0200 +++ b/mercurial/wireproto.py Fri Jul 16 19:01:34 2010 +0200 @@ -134,14 +134,11 @@ # server side def dispatch(repo, proto, command): - if command not in commands: - return False func, spec = commands[command] args = proto.getargs(spec) r = func(repo, proto, *args) if r != None: proto.respond(r) - return True def between(repo, proto, pairs): pairs = [decodelist(p, '-') for p in pairs.split(" ")]