Skip to content

Commit 1ccd3cd

Browse files
committed
nfctokens: block additional variations of UID
1 parent 9831e32 commit 1ccd3cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

nfctokens/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class NFCToken(models.Model):
4545
),
4646
# Common fixed UIDs, not unique
4747
RegexValidator(
48-
regex=r"^(00000000|01020304|04ffffff|12345678|ffffffff)$",
48+
regex=r"^(0{8}|0{14}|0{20}|f{8}|f{14}|f{20}|01020304|01020304050607|04ffffff|12345678)$",
4949
message="This is a common fixed/non-unique UID which cannot be used for authentication",
5050
inverse_match=True,
5151
),

0 commit comments

Comments
 (0)