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

Fix edge case when minion ID is a 16-character string #51298

Merged
merged 2 commits into from
Jan 24, 2019

Conversation

terminalmage
Copy link
Contributor

@terminalmage terminalmage commented Jan 23, 2019

Some code in salt._compat which checks if the value is a packed binary representation of an IPv6 address fails if the value passed is not a bytestring (i.e. a unicode type on PY2 or str type on PY3). This fixes that code when the minion ID is a 16-character string (not a bytestring). Note that the minion ID will never be a bytestring as of 2018.3.0, so this affects any 16-character minion ID when the minion ID is checked to see if it is really an IP address.

Resolves #51258.

Some code in salt._compat which checks if the value is a packed binary
representation of an IPv6 address fails if the value passed is not a
bytestring (i.e. a `unicode` type on PY2 or `str` type on PY3). This
fixes that code when the minion ID is a 16-character string (not a
bytestring). Note that the minion ID will never be a bytestring as of
2018.3.0, so this affects any 16-character minion ID when the minion ID
is checked to see if it is really an IP address.
@isbm
Copy link
Contributor

isbm commented Jan 23, 2019

@terminalmage thanks finding this in my 😞 code. I had problems with the IPv6 addresses length of 16, but seems totally missed this one.

@s0undt3ch s0undt3ch merged commit d6f4f05 into saltstack:2019.2.0.rc1 Jan 24, 2019
@terminalmage terminalmage deleted the issue51258 branch January 24, 2019 11:58
@Ch3LL Ch3LL added the bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch label Mar 1, 2019
garethgreenaway added a commit that referenced this pull request Mar 1, 2019
@Ch3LL Ch3LL added ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch. and removed bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch labels Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants