Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
1282086f
Unverified
Commit
1282086f
authored
7 years ago
by
Richard van der Hoff
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2659 from matrix-org/rav/apparently_we_dont_follow_our_own_spec_now
Allow upper-case characters in mxids
parents
2dce6b15
b70b6469
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/register.py
+3
-3
3 additions, 3 deletions
synapse/handlers/register.py
with
3 additions
and
3 deletions
synapse/handlers/register.py
+
3
−
3
View file @
1282086f
...
...
@@ -15,6 +15,7 @@
"""
Contains functions for registering clients.
"""
import
logging
import
urllib
from
twisted.internet
import
defer
...
...
@@ -22,7 +23,6 @@ from synapse.api.errors import (
AuthError
,
Codes
,
SynapseError
,
RegistrationError
,
InvalidCaptchaError
)
from
synapse.http.client
import
CaptchaServerHttpClient
from
synapse
import
types
from
synapse.types
import
UserID
from
synapse.util.async
import
run_on_reactor
from
._base
import
BaseHandler
...
...
@@ -47,7 +47,7 @@ class RegistrationHandler(BaseHandler):
@defer.inlineCallbacks
def
check_username
(
self
,
localpart
,
guest_access_token
=
None
,
assigned_user_id
=
None
):
if
types
.
contains_invalid_mxid_characters
(
localpart
)
:
if
urllib
.
quote
(
localpart
.
encode
(
'
utf-8
'
))
!=
localpart
:
raise
SynapseError
(
400
,
"
User ID can only contain characters a-z, 0-9, or
'
=_-./
'"
,
...
...
@@ -253,7 +253,7 @@ class RegistrationHandler(BaseHandler):
"""
Registers email_id as SAML2 Based Auth.
"""
if
types
.
contains_invalid_mxid_characters
(
localpart
)
:
if
urllib
.
quote
(
localpart
)
!=
localpart
:
raise
SynapseError
(
400
,
"
User ID can only contain characters a-z, 0-9, or
'
=_-./
'"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment