Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 41344:46781c1b5049
hgweb: don't use raw string for session vars
This r'' is leaking into the templating layer and causing an
assertion failure.
The r'' was added in d1fccbd50fcd (October 2017). Similar code
in hgweb_mod.py was also changed in that changeset. hgweb_mod.py was
updated in ec46415ed826 (March 2018) to use webutil.sessionvars(),
which doesn't use raw strings.
Differential Revision: https://phab.mercurial-scm.org/D5651
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 22 Jan 2019 18:07:51 -0800 |
parents | c93d046d4300 |
children | 876494fd967d |
comparison
equal
deleted
inserted
replaced
41343:6e54caaed08d | 41344:46781c1b5049 |
---|---|
508 styles, (style, mapfile) = hgweb_mod.getstyle(req, config, | 508 styles, (style, mapfile) = hgweb_mod.getstyle(req, config, |
509 self.templatepath) | 509 self.templatepath) |
510 if style == styles[0]: | 510 if style == styles[0]: |
511 vars['style'] = style | 511 vars['style'] = style |
512 | 512 |
513 sessionvars = webutil.sessionvars(vars, r'?') | 513 sessionvars = webutil.sessionvars(vars, '?') |
514 logourl = config('web', 'logourl') | 514 logourl = config('web', 'logourl') |
515 logoimg = config('web', 'logoimg') | 515 logoimg = config('web', 'logoimg') |
516 staticurl = (config('web', 'staticurl') | 516 staticurl = (config('web', 'staticurl') |
517 or req.apppath.rstrip('/') + '/static/') | 517 or req.apppath.rstrip('/') + '/static/') |
518 if not staticurl.endswith('/'): | 518 if not staticurl.endswith('/'): |