31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
diff -ur M2Crypto/tests/test_authcookie.py M2Crypto-0.21.1/tests/test_authcookie.py
|
|
--- M2Crypto/tests/test_authcookie.py 2011-01-15 20:10:05.000000000 +0100
|
|
+++ M2Crypto-0.21.1/tests/test_authcookie.py 2015-07-07 14:42:20.713482088 +0200
|
|
@@ -114,7 +114,7 @@
|
|
def test_cookie_str_changed_exp(self):
|
|
c = self.jar.makeCookie(self.exp, self.data)
|
|
cout = c.output()
|
|
- str = cout[:26] + '2' + cout[27:]
|
|
+ str = cout[:26] + chr(ord(cout[26])^1) + cout[27:]
|
|
s = Cookie.SmartCookie()
|
|
s.load(str)
|
|
self.failIf(self.jar.isGoodCookieString(s.output()))
|
|
@@ -122,7 +122,7 @@
|
|
def test_cookie_str_changed_data(self):
|
|
c = self.jar.makeCookie(self.exp, self.data)
|
|
cout = c.output()
|
|
- str = cout[:36] + 'X' + cout[37:]
|
|
+ str = cout[:36] + chr(ord(cout[36])^1) + cout[37:]
|
|
s = Cookie.SmartCookie()
|
|
s.load(str)
|
|
self.failIf(self.jar.isGoodCookieString(s.output()))
|
|
@@ -130,7 +130,7 @@
|
|
def test_cookie_str_changed_mac(self):
|
|
c = self.jar.makeCookie(self.exp, self.data)
|
|
cout = c.output()
|
|
- str = cout[:76] + 'X' + cout[77:]
|
|
+ str = cout[:76] + chr(ord(cout[76])^1) + cout[77:]
|
|
s = Cookie.SmartCookie()
|
|
s.load(str)
|
|
self.failIf(self.jar.isGoodCookieString(s.output()))
|