From 7cef7d0fcf5acccbff2237e8b52f9ff2af54f3ba Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 1 May 2021 21:32:58 -0600 Subject: [PATCH 1/3] Specify that email handling converts to lowercase first Spec for https://github.com/matrix-org/matrix-doc/pull/2265 --- content/appendices.md | 7 +++++++ data/api/identity/v2_lookup.yaml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/content/appendices.md b/content/appendices.md index 63caebf6..e971be86 100644 --- a/content/appendices.md +++ b/content/appendices.md @@ -772,6 +772,13 @@ Represents E-Mail addresses. The `address` is the raw email address in `user@domain` form with the domain in lowercase. It must not contain other text such as real name, angle brackets or a mailto: prefix. +In additional to lowercasing the domain component of an email address, +implementations are expected to lowercase the localpart as described +in [the unicode mapping file](https://www.unicode.org/Public/8.0.0/ucd/CaseFolding.txt) +prior to any processing. For example, `Strauß@Example.com` must be +considered to be `strauss@example.com` while processing the email +address. + ### PSTN Phone numbers Medium: `msisdn` diff --git a/data/api/identity/v2_lookup.yaml b/data/api/identity/v2_lookup.yaml index 9e5b18ec..66ac1a0a 100644 --- a/data/api/identity/v2_lookup.yaml +++ b/data/api/identity/v2_lookup.yaml @@ -101,6 +101,10 @@ paths: The addresses to look up. The format of the entries here depend on the `algorithm` used. Note that queries which have been incorrectly hashed or formatted will lead to no matches. + + Note that addresses are case sensitive: review the + [3PID Types](/appendices#pid-types) to verify the intended case an + identifier should be prior to submission/hashing. example: [ "4kenr7N9drpCJ4AfalmlGQVsOn3o2RHjkADUpXJWZUc", "nlo35_T5fzSGZzJApqu8lgIudJvmOQtDaHtr-I4rU7I" From 94ca646fb719442c679cbb90bf89a34a4b085a1d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 1 May 2021 21:34:08 -0600 Subject: [PATCH 2/3] changelog --- changelogs/identity_service/newsfragments/3167.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/identity_service/newsfragments/3167.clarification diff --git a/changelogs/identity_service/newsfragments/3167.clarification b/changelogs/identity_service/newsfragments/3167.clarification new file mode 100644 index 00000000..cc70fd71 --- /dev/null +++ b/changelogs/identity_service/newsfragments/3167.clarification @@ -0,0 +1 @@ +Clarify that some identifiers may be lowercase prior to processing, as per [MSC2265](https://github.com/matrix-org/matrix-doc/pull/2265). \ No newline at end of file From 53833d49a57160df990d267c4e285699ff147766 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 2 May 2021 23:11:12 -0600 Subject: [PATCH 3/3] Spelling --- content/appendices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/appendices.md b/content/appendices.md index e971be86..9132dd6d 100644 --- a/content/appendices.md +++ b/content/appendices.md @@ -772,7 +772,7 @@ Represents E-Mail addresses. The `address` is the raw email address in `user@domain` form with the domain in lowercase. It must not contain other text such as real name, angle brackets or a mailto: prefix. -In additional to lowercasing the domain component of an email address, +In addition to lowercasing the domain component of an email address, implementations are expected to lowercase the localpart as described in [the unicode mapping file](https://www.unicode.org/Public/8.0.0/ucd/CaseFolding.txt) prior to any processing. For example, `Strauß@Example.com` must be