Staging
v0.5.1
https://github.com/python/cpython
Revision 13a19139b5e76175bc95294d54afc9425e4f36c9 authored by Miss Islington (bot) on 09 August 2019, 15:22:19 UTC, committed by Ned Deily on 09 August 2019, 15:22:19 UTC
Before:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='a', domain='malicious.org'),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@malicious.org')

    After:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='', domain=''),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@')

https://bugs.python.org/issue34155
(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9)

Co-authored-by: jpic <jpic@users.noreply.github.com>
1 parent 1789bbd
Raw File
Tip revision: 13a19139b5e76175bc95294d54afc9425e4f36c9 authored by Miss Islington (bot) on 09 August 2019, 15:22:19 UTC
bpo-34155: Dont parse domains containing @ (GH-13079) (GH-14826)
Tip revision: 13a1913
pystrcmp.h
#ifndef Py_STRCMP_H
#define Py_STRCMP_H

#ifdef __cplusplus
extern "C" {
#endif

PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t);
PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *);

#ifdef MS_WINDOWS
#define PyOS_strnicmp strnicmp
#define PyOS_stricmp stricmp
#else
#define PyOS_strnicmp PyOS_mystrnicmp
#define PyOS_stricmp PyOS_mystricmp
#endif

#ifdef __cplusplus
}
#endif

#endif /* !Py_STRCMP_H */
back to top