A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-December/032111.html below:

[Python-checkins] python/dist/src/Lib Cookie.py,1.15,1.16

[Python-checkins] python/dist/src/Lib Cookie.py,1.15,1.16akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Sun, 29 Dec 2002 08:44:33 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv20928

Modified Files:
	Cookie.py 
Log Message:
Patch #655760: add warnings when the unsafe *Cookie classes are instantiated


Index: Cookie.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/Cookie.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Cookie.py	17 Dec 2002 18:59:51 -0000	1.15
--- Cookie.py	29 Dec 2002 16:44:31 -0000	1.16
***************
*** 223,227 ****
      from pickle import dumps, loads
  
! import re
  
  __all__ = ["CookieError","BaseCookie","SimpleCookie","SerialCookie",
--- 223,227 ----
      from pickle import dumps, loads
  
! import re, warnings
  
  __all__ = ["CookieError","BaseCookie","SimpleCookie","SerialCookie",
***************
*** 683,686 ****
--- 683,691 ----
      does not check for this limit, so be careful!!!
      """
+     def __init__(self, input=None):
+         warnings.warn("SerialCookie class is insecure; do not use it",
+                       DeprecationWarning)
+         BaseCookie.__init__(self, input)
+     # end __init__
      def value_decode(self, val):
          # This could raise an exception!
***************
*** 703,706 ****
--- 708,716 ----
      does not check for this limit, so be careful!!!
      """
+     def __init__(self, input=None):
+         warnings.warn("Cookie/SmartCookie class is insecure; do not use it",
+                       DeprecationWarning)
+         BaseCookie.__init__(self, input)
+     # end __init__
      def value_decode(self, val):
          strval = _unquote(val)





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4