[Bug 5871] New: Traceback on invalid bookmark reply from hgweb

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon May 7 10:25:34 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5871

            Bug ID: 5871
           Summary: Traceback on invalid bookmark reply from hgweb
           Product: Mercurial
           Version: 4.6
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: bookmarks
          Assignee: bugzilla at mercurial-scm.org
          Reporter: zash at zash.se
                CC: mercurial-devel at mercurial-scm.org

Faulty caching proxy configuration caused the same answer to be sent both for
phases and bookmark requests which caused this traceback:


$ hg push https://hg.prosody.im/site/ --debug -v -f
pushing to https://hg.prosody.im/site/
using https://hg.prosody.im/site/
sending capabilities command
query 1; heads
sending batch command
searching for changes
taking quick initial sample
query 2; still undecided: 1846, sample size is: 11
sending known command
2 total queries in 0.2286s
preparing listkeys for "phases"
sending listkeys command
received listkey for "phases": 15 bytes
checking for updated bookmarks
preparing listkeys for "bookmarks"
sending listkeys command
received listkey for "bookmarks": 15 bytes
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
** Mercurial Distributed SCM (version 4.6)
** Extensions loaded:
Traceback (most recent call last):
  File "/usr/bin/hg", line 41, in <module>
    dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 90, in
run
    status = (dispatch(req) or 0)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 210, in
dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 351, in
_runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 359, in
_callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 160, in
callcatch
    return func()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 341, in
_runcatchfunc
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 971, in
_dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 727, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 979, in
_runcommand
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 968, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1553, in
check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4216, in
push
    opargs=opargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/exchange.py", line 529, in
push
    _pushdiscovery(pushop)
  File "/usr/lib/python2.7/dist-packages/mercurial/exchange.py", line 567, in
_pushdiscovery
    step(pushop)
  File "/usr/lib/python2.7/dist-packages/mercurial/exchange.py", line 672, in
_pushdiscoverybookmarks
    remotebookmark = bookmod.unhexlifybookmarks(remotebookmark)
  File "/usr/lib/python2.7/dist-packages/mercurial/bookmarks.py", line 531, in
unhexlifybookmarks
    binremotemarks[name] = bin(node)
  File "/usr/lib/python2.7/dist-packages/mercurial/node.py", line 19, in bin
    return binascii.unhexlify(s)
TypeError: Non-hexadecimal digit found

Captured HTTP stream:

GET /site/?cmd=listkeys HTTP/1.1
Accept-Encoding: identity
vary: X-HgArg-1,X-HgProto-1
x-hgarg-1: namespace=phases
x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2 partial-pull
accept: application/mercurial-0.1
host: hg.prosody.im
user-agent: mercurial/proto-1.0 (Mercurial 4.6)

HTTP/1.1 200 Script output follows
Server: nginx/1.10.3
Date: Mon, 07 May 2018 14:10:56 GMT
Content-Type: application/mercurial-0.1
Content-Length: 15
Connection: keep-alive
Strict-Transport-Security: max-age=31556952
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline';
script-src 'self' 'unsafe-inline'

publishing      True



GET /site/?cmd=listkeys HTTP/1.1
Accept-Encoding: identity
vary: X-HgArg-1,X-HgProto-1
x-hgarg-1: namespace=bookmarks
x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2 partial-pull
accept: application/mercurial-0.1
host: hg.prosody.im
user-agent: mercurial/proto-1.0 (Mercurial 4.6)

HTTP/1.1 200 Script output follows
Server: nginx/1.10.3
Date: Mon, 07 May 2018 14:10:56 GMT
Content-Type: application/mercurial-0.1
Content-Length: 15
Connection: keep-alive
Strict-Transport-Security: max-age=31556952
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline';
script-src 'self' 'unsafe-inline'

publishing      True

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list