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

do not decode result_string returned by set_password #52

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

zarganum
Copy link
Contributor

@zarganum zarganum commented Aug 27, 2024

Field testing of set_password() with latest MIT and real AD introduced a potential decryption error of result_string which comes from server in encrypted format.
The decryption works fine with k5test.
The root cause of this problem remains unclear (may be a native library, cipher negotiation issue, etc).
Until it is resolved, the Python code at least should not crash.
Thus I propose to not decode the string and leave as is.

UPD:
The result_string may be a binary encoded structure in proprietary format returned as result_string. It can be decoded and i18n'ized by client, like kpasswd(1) does.
K5test result_string is always a UTF-8 string which is also possible.
Current implementation leaves decoding to the client so result_string is returned as a raw byte sequence.

setup.cfg Outdated Show resolved Hide resolved
@zarganum
Copy link
Contributor Author

zarganum commented Aug 27, 2024

this PR is legit because result_string from a real AD... contains a binary struct ad_policy_info that has to be decoded separately. And this is conditional, result_string still may be just a UTF-8.
Oh well, you'd never get bored with K5 and AD.

@jborean93
Copy link
Owner

Thanks for picking up this issue and fixing it!

@jborean93 jborean93 merged commit e634609 into jborean93:main Aug 27, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants