Skip to content

Commit

Permalink
Fix signup rate limit #3307
Browse files Browse the repository at this point in the history
When rate limited, the nil err is always returned.
  • Loading branch information
tung2744 authored Aug 11, 2023
2 parents 796da93 + 4dbfcff commit 9635307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/interaction/nodes/do_create_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (n *NodeDoCreateUser) GetEffects() ([]interaction.Effect, error) {
// check the rate limit only before running the effects
bucket := interaction.SignupPerIPRateLimitBucketSpec(ctx.Config.Authentication, isAnonymous, ip)
reservation = ctx.RateLimiter.Reserve(bucket)
if reservation.Error() != nil {
if err := reservation.Error(); err != nil {
return err
}
}
Expand Down

0 comments on commit 9635307

Please sign in to comment.