Skip to content

Do not throttle pos when logged in#6415

Merged
NicolasDorier merged 2 commits intobtcpayserver:masterfrom
Kukks:rate-limit-pos
Dec 9, 2024
Merged

Do not throttle pos when logged in#6415
NicolasDorier merged 2 commits intobtcpayserver:masterfrom
Kukks:rate-limit-pos

Conversation

@Kukks
Copy link
Copy Markdown
Member

@Kukks Kukks commented Nov 20, 2024

No description provided.

@pavlenex pavlenex linked an issue Nov 20, 2024 that may be closed by this pull request
string formResponse = null,
CancellationToken cancellationToken = default)
{
if (!(await _authorizationService.AuthorizeAsync(HttpContext.User, appId, Policies.CanViewInvoices)).Succeeded &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't believe you need to do this, you already have access to the User in the controller, which can tell you if it's anonymous or not. (IMHO if it's not anonymous it's good enough to skip the limit)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's still a vector on big public instances like voltage. Anyone can get a trial account and then be able to spam another's store trivially

@NicolasDorier
Copy link
Copy Markdown
Member

@Kukks tests are broken

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.

Add exclusion for rate zone limiter when user is logged in

2 participants