-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-5188] Fix password conversion bug
Passwords are stored in the DB as bytes and declared in the UserRecord structure as a string. The UserRecord structure is passed to the sqlx library to store the user's record in the DB. The sqlx library interprets the "e" character as an exponent and converts the string, which means it stores an incorrect password in the DB. The fix is to change the type of the Pass field from "string" to "[]byte" to prevent the sqlx library from performing this conversion, and manually casting between string and []byte as needed. The TestSpecialPassword test case was added to test this scenario. Change-Id: I5bb40f2083cf4509f7344fd06f8d9581283a7e74 Signed-off-by: Keith Smith <[email protected]>
- Loading branch information
Keith Smith
committed
Jul 6, 2017
1 parent
f013d54
commit e52c670
Showing
2 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters