Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-34623: Use XML_SetHashSalt in _elementtree #9146

Merged
merged 1 commit into from Sep 18, 2018

Conversation

@tiran
Copy link
Member

@tiran tiran commented Sep 10, 2018

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623

Copy link
Member

@vstinner vstinner left a comment

LGTM. Just a minor question on the NEWS entry.

@@ -0,0 +1,2 @@
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

This comment has been minimized.

@vstinner

vstinner Sep 11, 2018
Member

CPRNG or CSPRNG? :-) Maybe even write "cryptographic pseudo-random number generator (CPRNG)".

@@ -48,6 +52,9 @@ struct PyExpat_CAPI
enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
int (*DefaultUnknownEncodingHandler)(
void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
#if PYEXPAT_COMBINED_VERSION >= 20100

This comment has been minimized.

@serhiy-storchaka

serhiy-storchaka Sep 11, 2018
Member

Couldn't adding the slot conditionally break binary compatibility?

This comment has been minimized.

@tiran

tiran Sep 17, 2018
Author Member

The new PyExpat_CAPI_MAGIC version ensures that only compatible modules are loaded.

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

Signed-off-by: Christian Heimes <christian@python.org>
@tiran tiran force-pushed the tiran:bpo34623-xml-setsalt branch from cfc37f3 to 4125d70 Sep 17, 2018
@miss-islington miss-islington merged commit cb5778f into python:master Sep 18, 2018
9 checks passed
9 checks passed
Linux-PR #Linux-PR_20180917.56 succeeded
Details
Linux-PR-Coverage #Linux-PR-Coverage_20180917.43 succeeded
Details
Windows-PR #Windows-PR_20180917.56 succeeded
Details
bedevere/issue-number Issue number 34623 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
docs #docs_20180917.56 succeeded
Details
macOS-PR #macOS-PR_20180917.56 succeeded
Details
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 18, 2018

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 18, 2018

GH-9392 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit to miss-islington/cpython that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 18, 2018

GH-9393 is a backport of this pull request to the 3.6 branch.

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 18, 2018

Sorry, @tiran, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker cb5778f00ce48631c7140f33ba242496aaf7102b 2.7

@miss-islington miss-islington self-assigned this Sep 18, 2018
@tiran tiran deleted the tiran:bpo34623-xml-setsalt branch Sep 18, 2018
tiran added a commit to tiran/cpython that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 18, 2018

GH-9394 is a backport of this pull request to the 2.7 branch.

tiran added a commit to tiran/cpython that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington added a commit that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
miss-islington added a commit that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f)

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



https://bugs.python.org/issue34623
miss-islington added a commit that referenced this pull request Sep 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
stratakis added a commit to stratakis/cpython that referenced this pull request Oct 17, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
stratakis added a commit to stratakis/cpython that referenced this pull request Oct 18, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
yahya-abou-imran added a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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



https://bugs.python.org/issue34623
mingwandroid added a commit to mingwandroid/cpython that referenced this pull request Feb 18, 2019
…nGH-9394)

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f)

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

https://bugs.python.org/issue34623
mingwandroid added a commit to mingwandroid/cpython that referenced this pull request Feb 23, 2019
…nGH-9394)

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623.
(cherry picked from commit cb5778f)

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

https://bugs.python.org/issue34623
larryhastings added a commit that referenced this pull request Feb 25, 2019
* bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
larryhastings added a commit that referenced this pull request Feb 25, 2019
* bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants