#1741 Faulty decoding of SCRAM credentials from XEP-0227 data
Reporter
Zash
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Milestone-0.12
Difficulty-Easy
Status-Fixed
Type-Defect
Zash
on
What steps will reproduce the problem?
1. migrate 'accounts' data in SCRAM format to storage_xep0227
2. set 'storage={accounts="xep0227"}'
3. attempt to authenticate
What is the expected output?
Authentication should succeed
What do you see instead?
Authentication fails
What version of the product are you using?
Observed on 0.12+some recent commits.
Please provide any additional information below.
Querying the data via the shell shows the `server_key` and `stored_key` appearing to be base64-encoded instead of hexadecimal, as is expected.
The function `base64_to_hex(s)` for converting the base64-encoded data from the XML representation into the internal representation looks like a copy-paste from the inverse function.
What steps will reproduce the problem? 1. migrate 'accounts' data in SCRAM format to storage_xep0227 2. set 'storage={accounts="xep0227"}' 3. attempt to authenticate What is the expected output? Authentication should succeed What do you see instead? Authentication fails What version of the product are you using? Observed on 0.12+some recent commits. Please provide any additional information below. Querying the data via the shell shows the `server_key` and `stored_key` appearing to be base64-encoded instead of hexadecimal, as is expected. The function `base64_to_hex(s)` for converting the base64-encoded data from the XML representation into the internal representation looks like a copy-paste from the inverse function.
Fixed in https://hg.prosody.im/trunk/rev/10cc52e4b310
Changes