This is a duplicate of #316 for mainline which fixed the same bug on `dinsic`. The bug originally stemmed from #311.
@@ -0,0 +1 @@
+Fix a regression in v2.2.0 where the wrong characters would be obfuscated in a 3pid invite.
@@ -169,7 +169,7 @@ class StoreInviteServlet(Resource):
# If the string is shorter than the defined threshold, redact based on length
if len(s) <= characters_to_reveal:
if len(s) > 5:
- return s[3] + u"..."
+ return s[:3] + u"..."
if len(s) > 1:
return s[0] + u"..."
return u"..."