Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
nm.debian.org
Commits
6e691c21
Verified
Commit
6e691c21
authored
May 25, 2021
by
Mattia Rizzolo
Browse files
dsa: forbid - in usernames
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
6210b2d5
Pipeline
#257524
passed with stage
in 5 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dsa/models.py
View file @
6e691c21
...
...
@@ -85,6 +85,12 @@ class LDAPFields(models.Model):
"uid"
:
_
(
"DSA expressed a preference against dots in usernames."
" Contact debian-admin@lists.debian.org for details."
),
})
# See RT#8583: - breaks the email address extension.
if
self
.
uid
and
"-"
in
self
.
uid
:
raise
ValidationError
({
"uid"
:
_
(
"DSA forbids dashes in usernames."
" Contact debian-admin@lists.debian.org for details."
),
})
if
self
.
uid
and
self
.
uid
in
dam_forbidden_uids
:
raise
ValidationError
({
"uid"
:
_
(
"The requested UID is a system user or a well known alias,"
...
...
dsa/tests/test_models.py
View file @
6e691c21
...
...
@@ -19,6 +19,7 @@ class TestLDAPFields(TestCase):
"bo"
,
"fooBar"
,
"foo.bar"
,
"foo-bar"
,
"root"
,
):
f
.
uid
=
u
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment