D2776: hgweb: use a multidict for holding query string parameters
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Thu Mar 15 11:38:14 EDT 2018
yuja added inline comments.
INLINE COMMENTS
> indygreg wrote in request.py:31
> I agree with the sentiment about this being a list in disguise. One reason I didn't bother to optimize it is because I don't think we do any `qsparams` lookups in loops and I don't believe we have any more than ~10 arguments to any single request. So even if we have an `O(n^2)` situation, n is so small that it doesn't matter.
>
> I can add a follow-up comment easily enough. Or we could just index the fields by key. That doesn't seem too difficult.
Isn't the `n` controllable by a malicious user?
I agree with @martinvonz in that it would be probably easier to
write as a dict of lists (or dict + lists).
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2776
To: indygreg, #hg-reviewers, durin42
Cc: yuja, av6, martinvonz, durin42, mercurial-devel
More information about the Mercurial-devel
mailing list