HangfireBasicAuthenticationFilter icon indicating copy to clipboard operation
HangfireBasicAuthenticationFilter copied to clipboard

[PR] Fixed invalid tokens check

Open svensteudter opened this issue 4 years ago • 0 comments

Check for invalid tokens: Current: checks: Are_Invalid() { token.length == 2 && token[0].IsNullOrWhiteSpace && token[1].IsNullOrWhiteSpace } so all three conditions must be true => token is invalid. Expected: But token length == 2 is valid and a only one token[] being null or emptyshould result in invalid

Approach: renamed all three checks to "Invalid_..." checking for being invalid (i.e. token.length != 2)

and check all three conditionns with OR, ONE condition NOT met => invalid token.

svensteudter avatar Jan 17 '22 11:01 svensteudter