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
931c2af1
Commit
931c2af1
authored
Aug 21, 2002
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-applying patches to autoquote cookie values due to fears of breakage
and lack of coverage in the code.
parent
6d0ca8e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
26 deletions
+10
-26
lib/python/Products/OFSP/help/Request.py
lib/python/Products/OFSP/help/Request.py
+1
-2
lib/python/Products/OFSP/help/Response.py
lib/python/Products/OFSP/help/Response.py
+0
-5
lib/python/ZPublisher/BaseResponse.py
lib/python/ZPublisher/BaseResponse.py
+3
-8
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+3
-3
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+3
-8
No files found.
lib/python/Products/OFSP/help/Request.py
View file @
931c2af1
...
...
@@ -41,8 +41,7 @@ class Request:
- Cookies
These are the cookie data, if present. Cookie values
are unquoted using url_unquote_plus.
These are the cookie data, if present.
- Lazy Data
...
...
lib/python/Products/OFSP/help/Response.py
View file @
931c2af1
...
...
@@ -120,11 +120,6 @@ class Response:
"value". This overwrites any previously set value for the
cookie in the Response object.
The value passed in is quoted using url_quote_plus before
the cookie is sent to the browser, and is unquoted using
url_unquote_plus when the cookie is received back from
the browser and stored in REQUEST.cookies.
Permission -- Always available
'''
...
...
lib/python/ZPublisher/BaseResponse.py
View file @
931c2af1
...
...
@@ -12,11 +12,10 @@
##############################################################################
'''CGI Response Output formatter
$Id: BaseResponse.py,v 1.1
6 2002/08/14 22:09:40 mj
Exp $'''
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
$Id: BaseResponse.py,v 1.1
7 2002/08/21 03:09:31 chrism
Exp $'''
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
import
types
,
sys
from
urllib
import
quote_plus
from
types
import
StringType
,
InstanceType
from
zExceptions
import
Unauthorized
...
...
@@ -72,10 +71,6 @@ class BaseResponse:
cookie-enabled browsers with a key "name" and value
"value". This overwrites any previously set value for the
cookie in the Response object.
The value is quoted using urllib's url_quote_plus, which
quoting will be undone when the value is accessed through
REQUEST in a later transaction.
'''
cookies
=
self
.
cookies
if
cookies
.
has_key
(
name
):
...
...
@@ -84,7 +79,7 @@ class BaseResponse:
cookie
=
cookies
[
name
]
=
{}
for
k
,
v
in
kw
.
items
():
cookie
[
k
]
=
v
cookie
[
'value'
]
=
quote_plus
(
value
)
cookie
[
'value'
]
=
value
def
appendBody
(
self
,
body
):
self
.
setBody
(
self
.
getBody
()
+
body
)
...
...
lib/python/ZPublisher/HTTPRequest.py
View file @
931c2af1
...
...
@@ -11,13 +11,13 @@
#
##############################################################################
__version__
=
'$Revision: 1.
79
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
80
$'
[
11
:
-
2
]
import
re
,
sys
,
os
,
urllib
,
time
,
random
,
cgi
,
codecs
from
BaseRequest
import
BaseRequest
from
HTTPResponse
import
HTTPResponse
from
cgi
import
FieldStorage
,
escape
from
urllib
import
quote
,
unquote
,
unquote_plus
,
splittype
,
splitport
from
urllib
import
quote
,
unquote
,
splittype
,
splitport
from
copy
import
deepcopy
from
Converters
import
get_converter
from
TaintedString
import
TaintedString
...
...
@@ -1458,7 +1458,7 @@ def parse_cookie(text,
finally
:
release
()
if
not
already_have
(
name
):
result
[
name
]
=
unquote_plus
(
value
)
if
not
already_have
(
name
):
result
[
name
]
=
value
return
apply
(
parse_cookie
,(
text
[
l
:],
result
))
...
...
lib/python/ZPublisher/HTTPResponse.py
View file @
931c2af1
...
...
@@ -12,12 +12,11 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.6
8 2002/08/14 22:09:40 mj
Exp $'''
__version__
=
'$Revision: 1.6
8
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.6
9 2002/08/21 03:09:31 chrism
Exp $'''
__version__
=
'$Revision: 1.6
9
$'
[
11
:
-
2
]
import
types
,
os
,
sys
,
re
import
zlib
,
struct
from
urllib
import
quote_plus
from
string
import
translate
,
maketrans
from
types
import
StringType
,
InstanceType
,
LongType
,
UnicodeType
from
BaseResponse
import
BaseResponse
...
...
@@ -492,10 +491,6 @@ class HTTPResponse(BaseResponse):
cookie-enabled browsers with a key "name" and value
"value". This overwrites any previously set value for the
cookie in the Response object.
The value is quoted using urllib's url_quote_plus, which
quoting will be undone when the value is accessed through
REQUEST in a later transaction.
'''
cookies
=
self
.
cookies
if
cookies
.
has_key
(
name
):
...
...
@@ -504,7 +499,7 @@ class HTTPResponse(BaseResponse):
cookie
=
cookies
[
name
]
=
{}
for
k
,
v
in
kw
.
items
():
cookie
[
k
]
=
v
cookie
[
'value'
]
=
quote_plus
(
value
)
cookie
[
'value'
]
=
value
def
appendHeader
(
self
,
name
,
value
,
delimiter
=
","
):
'''
\
...
...
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