Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit afbbac1

Browse files
authored
Removed a confusing line from a docstring in http.cookies (GH-6482)
There's no reason a cookie should _ever_ contain pickled data. That's just asking for a critical security vulnerability. Back in Python2 there were helpers for doing that, but they're no more in Python3. Now coded_value is used when the value needs to be encoded for any reason.
1 parent 1a5c4bd commit afbbac1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/http/cookies.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ class Morsel(dict):
256256
In a cookie, each such pair may have several attributes, so this class is
257257
used to keep the attributes associated with the appropriate key,value pair.
258258
This class also includes a coded_value attribute, which is used to hold
259-
the network representation of the value. This is most useful when Python
260-
objects are pickled for network transit.
259+
the network representation of the value.
261260
"""
262261
# RFC 2109 lists these attributes as reserved:
263262
# path comment domain

0 commit comments

Comments
 (0)