mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
This commit is contained in:
parent
ec1712a166
commit
2daf6ae249
32 changed files with 660 additions and 152 deletions
|
@ -143,7 +143,7 @@ class InternalFunctionsTest(unittest.TestCase):
|
|||
('a', 'b', 'c')), ("test {a b} c", ()))
|
||||
# state spec and options
|
||||
self.assertEqual(ttk._format_elemcreate('image', False, 'test',
|
||||
('a', 'b'), a='x', b='y'), ("test a b", ("-a", "x", "-b", "y")))
|
||||
('a', 'b'), a='x'), ("test a b", ("-a", "x")))
|
||||
# format returned values as a tcl script
|
||||
# state spec with multiple states and an option with a multivalue
|
||||
self.assertEqual(ttk._format_elemcreate('image', True, 'test',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue