Closed
Bug 728636
Opened 9 years ago
Closed 9 years ago
Conversion of email address to account should lowercase
Categories
(Firefox for Android Graveyard :: Android Sync, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla13
People
(Reporter: rnewman, Assigned: rnewman)
Details
We only lowercase the output. public static String usernameFromAccount(String account) throws NoSuchAlgorithmException, UnsupportedEncodingException { if (account == null || account.equals("")) { throw new IllegalArgumentException("No account name provided."); } if (account.matches("^[A-Za-z0-9._-]+$")) { return account; } return Utils.sha1Base32(account); } public static byte[] sha1(String utf8) throws NoSuchAlgorithmException, UnsupportedEncodingException { MessageDigest sha1 = MessageDigest.getInstance("SHA-1"); return sha1.digest(utf8.getBytes("UTF-8")); } public static String sha1Base32(String utf8) throws NoSuchAlgorithmException, UnsupportedEncodingException { return new Base32().encodeAsString(sha1(utf8)).toLowerCase(); } This, of course, will b0rk setup for anyone who capitalizes their email address (or whose Android keyboard does it for them).
Assignee | ||
Comment 1•9 years ago
|
||
https://github.com/mozilla-services/android-sync/pull/76
Assignee | ||
Comment 2•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/08df8cb41dfd
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Comment 3•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/08df8cb41dfd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Updated•8 years ago
|
Product: Mozilla Services → Android Background Services
Updated•3 years ago
|
Product: Android Background Services → Firefox for Android
Updated•2 months ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•