We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cherrypy.url
This call to cherrypy.url fails with IndexError:
IndexError
>>> cherrypy.url(qs='../../../../../../etc/passwd') ... IndexError: pop from empty list
The culprit seems in this logic, which strips newurl of as many atoms as there are ..: https://github.com/cherrypy/cherrypy/blob/master/cherrypy/_helper.py#L261,L271
newurl
atoms
..
There are various problems.
That logic should only applied to the "path" part of newurl, not to the full url.
As a consequence of the point above, .. in the query string qs should not be considered
qs
To consider: redundant .. should be ignored, to mimic os.path.normpath:
os.path.normpath
>>> os.path.normpath('/etc/../../../usr') '/usr'
The text was updated successfully, but these errors were encountered:
2a6f1c6
Merge pull request #1596 from lbolla/issue-188
bb79ff4
Fix #1595 Fix path normlisation
No branches or pull requests
This call to
cherrypy.url
fails withIndexError
:The culprit seems in this logic, which strips
newurl
of as manyatoms
as there are..
:https://github.com/cherrypy/cherrypy/blob/master/cherrypy/_helper.py#L261,L271
There are various problems.
That logic should only applied to the "path" part of
newurl
, not to the full url.As a consequence of the point above,
..
in the query stringqs
should not be consideredTo consider: redundant
..
should be ignored, to mimicos.path.normpath
:The text was updated successfully, but these errors were encountered: