summaryrefslogtreecommitdiff
path: root/Include/pydebug.h
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-20 19:54:16 +0100
committerGeorg Brandl <georg@python.org>2012-02-20 19:54:16 +0100
commit5af1ccb2a86c32b4a7ed302bd75dd824606fc222 (patch)
tree84cbb3374227066bbf5f8ef77a994eceb4d3a7db /Include/pydebug.h
parentc3bd9bfd3d1b9af05669f68c08079fed02a28c67 (diff)
downloadcpython-5af1ccb2a86c32b4a7ed302bd75dd824606fc222.tar.gz
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.
Diffstat (limited to 'Include/pydebug.h')
-rw-r--r--Include/pydebug.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/pydebug.h b/Include/pydebug.h
index 0a31f5ba01..5969e44419 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -19,6 +19,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