diff test/test_cgi.py @ 5488:52cb53eedf77

reworked random number use prefer secrets module from Python 3.6+, random.SystemRandom and finally plain random
author Christof Meerwald <cmeerw@cmeerw.org>
date Sat, 04 Aug 2018 22:40:16 +0100
parents b0359a7c5b6d
children 19bd4b413ed6
line wrap: on
line diff
--- a/test/test_cgi.py	Sun Aug 05 11:45:43 2018 +0000
+++ b/test/test_cgi.py	Sat Aug 04 22:40:16 2018 +0100
@@ -953,7 +953,7 @@
         del(out[0])
 
         form2 = copy.copy(form)
-        nonce = anti_csrf_nonce(cl, cl)
+        nonce = anti_csrf_nonce(cl)
         # verify that we can see the nonce
         otks = cl.db.getOTKManager()
         isitthere = otks.exists(nonce)
@@ -985,7 +985,7 @@
         cl.env['REQUEST_METHOD'] = 'GET' 
         cl.env['HTTP_REFERER'] = 'http://whoami.com/path/'
         form2 = copy.copy(form)
-        nonce = anti_csrf_nonce(cl, cl)
+        nonce = anti_csrf_nonce(cl)
         form2.update({'@csrf': nonce})
         # add a real csrf field to the form and rerun the inner_main
         cl.form = db_test_base.makeForm(form2)

Roundup Issue Tracker: http://roundup-tracker.org/