Commit 29d7535b authored by Dominic Battre's avatar Dominic Battre Committed by Commit Bot

Removed visually non-distinct characters from password generator

This CL removes the following characters from generated passwords as they are
visually not easy to distinguish and users may still need to type a generated
password from time to time:

- l (lowercase L)
- I (capital i)
- 1 (one)
- O (capital o)
- 0 (zero)
- o (lowercase O)

Bug: 846694
Change-Id: Iea1a62abf6565bcad74a2ff762c0ad69bb36eba0
Reviewed-on: https://chromium-review.googlesource.com/1096756Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566361}
parent e92d1d03
...@@ -21,11 +21,18 @@ const uint32_t kDefaultPasswordLength = 15; ...@@ -21,11 +21,18 @@ const uint32_t kDefaultPasswordLength = 15;
namespace { namespace {
// Default character sets used if the spec does not override the character set. // Default character sets used if the spec does not override the character set.
constexpr char kLowerCaseChars[] = "abcdefghijklmnopqrstuvwxyz"; // Removed characters due to visual similarity:
constexpr char kUpperCaseChars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; // - l (lowercase L)
// - I (capital i)
// - 1 (one)
// - O (capital o)
// - 0 (zero)
// - o (lowercase O)
constexpr char kLowerCaseChars[] = "abcdefghijkmnpqrstuvwxyz";
constexpr char kUpperCaseChars[] = "ABCDEFGHJKLMNPQRSTUVWXYZ";
constexpr char kAlphabeticChars[] = constexpr char kAlphabeticChars[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; "abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
constexpr char kDigits[] = "0123456789"; constexpr char kDigits[] = "23456789";
constexpr char kSymbols[] = "-_."; constexpr char kSymbols[] = "-_.";
// Returns a default password requirements specification that requires: // Returns a default password requirements specification that requires:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment