Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
8a65bbf1
Commit
8a65bbf1
authored
Apr 01, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backported fix for LP #257675
parent
1bd955ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/ZPublisher/HTTPRequest.py
src/ZPublisher/HTTPRequest.py
+6
-0
src/ZPublisher/tests/testHTTPRequest.py
src/ZPublisher/tests/testHTTPRequest.py
+7
-0
No files found.
doc/CHANGES.rst
View file @
8a65bbf1
...
...
@@ -31,6 +31,9 @@ Features Added
Bugs Fixed
++++++++++
- LP #257675: request.form contained '-C':'' when no QUERY_STRING was in
the environment.
- Zope 3-style resource directories would throw an Unauthorized error when
trying to use restrictedTraverse() to reach a resource in a sub-directory
of the resource directory.
...
...
src/ZPublisher/HTTPRequest.py
View file @
8a65bbf1
...
...
@@ -478,6 +478,12 @@ class HTTPRequest(BaseRequest):
other
=
self
.
other
taintedform
=
self
.
taintedform
# If 'QUERY_STRING' is not present in environ
# FieldStorage will try to get it from sys.argv[1]
# which is not what we need.
if
not
environ
.
has_key
(
'QUERY_STRING'
):
environ
[
'QUERY_STRING'
]
=
''
meth
=
None
fs
=
ZopeFieldStorage
(
fp
=
fp
,
environ
=
environ
,
keep_blank_values
=
1
)
if
not
hasattr
(
fs
,
'list'
)
or
fs
.
list
is
None
:
...
...
src/ZPublisher/tests/testHTTPRequest.py
View file @
8a65bbf1
...
...
@@ -128,6 +128,13 @@ class HTTPRequestTests(unittest.TestCase):
"Key %s not correctly reproduced in tainted; expected %r, "
"got %r"
%
(
key
,
req
.
form
[
key
],
req
.
taintedform
[
key
]))
def
test_processInputs_wo_query_string
(
self
):
env
=
{
'SERVER_NAME'
:
'testingharnas'
,
'SERVER_PORT'
:
'80'
}
req
=
self
.
_makeOne
(
environ
=
env
)
req
.
processInputs
()
self
.
_noFormValuesInOther
(
req
)
self
.
assertEquals
(
req
.
form
,
{})
def
test_processInputs_wo_marshalling
(
self
):
inputs
=
(
(
'foo'
,
'bar'
),
(
'spam'
,
'eggs'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment