Enforce lowercase username registration policy

jdbi_and_liquibase v0.1.0
Maxime Dor 7 years ago
parent 83cb8bfce2
commit 8efcda5967

@ -34,18 +34,17 @@ Set `endpoint` to the appropriate value.
## Next steps
### Lowercase username enforcement
If you would like to avoid user creating accounts with upper case letter in their usernames,
use the `enforceLowercase` config item.
To avoid creating users accounts with uppercase characters in their usernames and running into known
issues regarding case sensitivity in synapse, attempting to login with such username will fail.
It is highly recommended to enable this option to avoid nasty case sensitivity bugs and invites
management on a day-to-day basis.
It is highly recommended to keep this feature enable, but in case you would like to disable it:
```
[...]
config:
policy:
registration:
username:
enforceLowercase: True
enforceLowercase: False
```
### Profile auto-fill

@ -66,7 +66,7 @@ class RestAuthProvider(object):
logger.info("User %s does not exist yet, creating...", user_id)
if localpart != localpart.lower() and self.regLower:
logger.info('User %s was not allowed to be created, enforcing lowercase policy', localpart)
logger.info('User %s was cannot be created due to username lowercase policy', localpart)
defer.returnValue(False)
user_id, access_token = (yield self.account_handler.register(localpart=localpart))
@ -118,7 +118,7 @@ class RestAuthProvider(object):
class _RestConfig(object):
endpoint = ''
regLower = False
regLower = True
setNameOnRegister = True
setNameOnLogin = False

Loading…
Cancel
Save