Skip to content

Reset blacklisted_at when regenerating a banned token#248

Merged
Samuelfaure merged 1 commit into
developfrom
fix/regenerated-token-inherits-blacklist
Jul 7, 2026
Merged

Reset blacklisted_at when regenerating a banned token#248
Samuelfaure merged 1 commit into
developfrom
fix/regenerated-token-inherits-blacklist

Conversation

@skelz0r

@skelz0r skelz0r commented Jul 7, 2026

Copy link
Copy Markdown
Member

When banning a token with regeneration, the Ban organizer runs BanToken (which sets blacklisted_at on the original token) then RegenerateToken, which builds the replacement via token.dup. dup copies every attribute including the freshly-set blacklisted_at, so the regenerated token was born banned and would expire at the exact same moment as the token it was meant to replace, defeating the purpose of regeneration.

Explicitly clear blacklisted_at on the duplicate so the new token is actually active.

When banning a token with regeneration, the Ban organizer runs BanToken
(which sets blacklisted_at on the original token) then RegenerateToken,
which builds the replacement via token.dup. dup copies every attribute
including the freshly-set blacklisted_at, so the regenerated token was
born banned and would expire at the exact same moment as the token it
was meant to replace, defeating the purpose of regeneration.

Explicitly clear blacklisted_at on the duplicate so the new token is
actually active.
@skelz0r skelz0r self-assigned this Jul 7, 2026
@skelz0r skelz0r requested review from Samuelfaure and Un3x July 7, 2026 10:04

@Samuelfaure Samuelfaure left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopsie doopsie

@Samuelfaure Samuelfaure merged commit 9cab9dd into develop Jul 7, 2026
10 checks passed
@Samuelfaure Samuelfaure deleted the fix/regenerated-token-inherits-blacklist branch July 7, 2026 10:09
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