mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +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
|
@ -174,6 +174,8 @@ typedef void (*PyOS_sighandler_t)(int);
|
|||
PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
|
||||
PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
|
||||
|
||||
/* Random */
|
||||
PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue