Skip to content

Fixed circumventing blocking by appending whitespace to username#248

Merged
kencochrane merged 1 commit into
jazzband:masterfrom
nrth:fix-username-whitespace-block-circumvention
Jul 1, 2025
Merged

Fixed circumventing blocking by appending whitespace to username#248
kencochrane merged 1 commit into
jazzband:masterfrom
nrth:fix-username-whitespace-block-circumvention

Conversation

@nrth

@nrth nrth commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Appending whitespace to username allows circumventing already blocked usernames (until the 255 char limit is reached), settings used:

DEFENDER_LOCK_OUT_BY_IP_AND_USERNAME = True
DEFENDER_STORE_ACCESS_ATTEMPTS = False

The Django admin username/form behaviour automatically strips trailing whitespace (not directly related issue) which allows this to be effective in the first place, I understand that the 255 limit very much counters the attack vector here somewhat, still something that should be considered imo.

@nrth
nrth force-pushed the fix-username-whitespace-block-circumvention branch from 9923425 to 29addd2 Compare July 1, 2025 11:29
@kencochrane

Copy link
Copy Markdown
Collaborator

Thanks, test failed because they were referencing python versions that are end of life'd

@kencochrane
kencochrane merged commit 37e5dd3 into jazzband:master Jul 1, 2025
10 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants