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

file.manage_file: uppercase checksums now work #40754

Merged
merged 2 commits into from Apr 20, 2017

Conversation

Projects
None yet
3 participants
@lordcirth
Contributor

lordcirth commented Apr 18, 2017

What does this PR do?

file.manage_file() in modules/file.py now correctly matches
user-supplied uppercase hashes with equivalent lowercase hashes.

What issues does this PR fix or reference?

Fixes #38914

Previous Behavior

get_hash supplied a lowercase hexadecimal hash, eg
"637dbd6281672de432758da6d22af802"
which was compared to the string the user provided with, eg:
file.managed:
- source_hash: 637DBD6281672DE432758DA6D22AF802

If the user supplied an uppercase-formatted hash, case-sensitive string compares would fail.

New Behavior

user-supplied hashes are internally converted to lower-case immediately after being received as arguments.

Tests written?

No

@salt-jenkins

This comment has been minimized.

Contributor

salt-jenkins commented Apr 18, 2017

@lordcirth, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terminalmage, @whiteinge and @techhat to be potential reviewers.

@cachedout cachedout merged commit 3b9ebeb into saltstack:2016.3 Apr 20, 2017

3 of 6 checks passed

default Pull Requests » Salt PR - Main Build #3633
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt Linode Ubuntu14.04 #10498 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #10685 — FAILURE
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #13183 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » salt-pr-docs-n #6007 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #10543 — SUCCESS
Details

@lordcirth lordcirth deleted the lordcirth:fix-uppercase-checksums branch Apr 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment