Staging
v0.5.1
https://github.com/python/cpython
Revision 582d188e6e3487180891f1fc457a80dec8be26a8 authored by Christian Heimes on 24 September 2018, 12:38:31 UTC, committed by Miss Islington (bot) on 24 September 2018, 12:38:31 UTC


The SAX parser no longer processes general external entities by default
to increase security. Before, the parser created network connections
to fetch remote files or loaded local files from the file system for DTD
and entities.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue17239.
(cherry picked from commit 17b1d5d4e36aa57a9b25a0e694affbd1ee637e45)

Co-authored-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue17239
1 parent 6b48f98
Raw File
Tip revision: 582d188e6e3487180891f1fc457a80dec8be26a8 authored by Christian Heimes on 24 September 2018, 12:38:31 UTC
[3.6] bpo-17239: Disable external entities in SAX parser (GH-9217) (GH-9512)
Tip revision: 582d188
invalid_parameter_handler.c
#ifdef _MSC_VER

#include <stdlib.h>

#if _MSC_VER >= 1900
/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
 * macros. It does not need to be defined when building using MSVC
 * earlier than 14.0 (_MSC_VER == 1900).
 */

static void __cdecl _silent_invalid_parameter_handler(
    wchar_t const* expression,
    wchar_t const* function,
    wchar_t const* file,
    unsigned int line,
    uintptr_t pReserved) { }

_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler;

#endif

#endif
back to top