diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-04-24 20:11:36 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-04-24 20:11:36 -0400 |
commit | f5437632f486b7d0a0a181c58f113c86d032b02c (patch) | |
tree | 407388e3003a210a89f4b2128d7ad656f8b79d26 /vendor/golang.org/x/text/secure/precis | |
parent | 7f68a60f8c228d5604e0566bf84cabb145d16c37 (diff) | |
download | chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.gz chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.bz2 chat-f5437632f486b7d0a0a181c58f113c86d032b02c.zip |
Upgrading server dependancies (#6215)
Diffstat (limited to 'vendor/golang.org/x/text/secure/precis')
-rw-r--r-- | vendor/golang.org/x/text/secure/precis/profile_test.go | 7 | ||||
-rw-r--r-- | vendor/golang.org/x/text/secure/precis/profiles.go | 17 |
2 files changed, 20 insertions, 4 deletions
diff --git a/vendor/golang.org/x/text/secure/precis/profile_test.go b/vendor/golang.org/x/text/secure/precis/profile_test.go index 253b2a08a..916fc8b6d 100644 --- a/vendor/golang.org/x/text/secure/precis/profile_test.go +++ b/vendor/golang.org/x/text/secure/precis/profile_test.go @@ -100,6 +100,13 @@ var compareTestCases = []struct { {"Å", "å", true}, {"ff", "ff", true}, // because of NFKC {"ß", "sS", false}, + + // After applying the Nickname profile, \u00a8 becomes \u0020\u0308, + // however because the nickname profile is not idempotent, applying it again + // to \u0020\u0308 results in \u0308. This behavior is "correct", even if it + // is unexpected. + {"\u00a8", "\u0020\u0308", false}, + {"\u0020\u0308", "\u0308", true}, }}, } diff --git a/vendor/golang.org/x/text/secure/precis/profiles.go b/vendor/golang.org/x/text/secure/precis/profiles.go index 8b46d504c..86010025c 100644 --- a/vendor/golang.org/x/text/secure/precis/profiles.go +++ b/vendor/golang.org/x/text/secure/precis/profiles.go @@ -13,10 +13,19 @@ import ( ) var ( - Nickname *Profile = nickname // Implements the Nickname profile specified in RFC 7700. - UsernameCaseMapped *Profile = usernameCaseMap // Implements the UsernameCaseMapped profile specified in RFC 7613. - UsernameCasePreserved *Profile = usernameNoCaseMap // Implements the UsernameCasePreserved profile specified in RFC 7613. - OpaqueString *Profile = opaquestring // Implements the OpaqueString profile defined in RFC 7613 for passwords and other secure labels. + // Implements the Nickname profile specified in RFC 7700. + // The nickname profile is not idempotent and may need to be applied multiple + // times before being used for comparisons. + Nickname *Profile = nickname + + // Implements the UsernameCaseMapped profile specified in RFC 7613. + UsernameCaseMapped *Profile = usernameCaseMap + + // Implements the UsernameCasePreserved profile specified in RFC 7613. + UsernameCasePreserved *Profile = usernameNoCaseMap + + // Implements the OpaqueString profile defined in RFC 7613 for passwords and other secure labels. + OpaqueString *Profile = opaquestring ) var ( |