mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merge from 3.1: 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:
commit
09a7c72cad
34 changed files with 676 additions and 162 deletions
|
@ -20,6 +20,7 @@ PyAPI_DATA(int) Py_DivisionWarningFlag;
|
|||
PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
|
||||
PyAPI_DATA(int) Py_NoUserSiteDirectory;
|
||||
PyAPI_DATA(int) Py_UnbufferedStdioFlag;
|
||||
PyAPI_DATA(int) Py_HashRandomizationFlag;
|
||||
|
||||
/* this is a wrapper around getenv() that pays attention to
|
||||
Py_IgnoreEnvironmentFlag. It should be used for getting variables like
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue