AngularJSAuthentication icon indicating copy to clipboard operation
AngularJSAuthentication copied to clipboard

string.Equals in AccountController will not match *

Open O-Mutt opened this issue 8 years ago • 0 comments

AccountController ~line 270
 if (!string.Equals(client.AllowedOrigin, redirectUri.GetLeftPart(UriPartial.Authority), StringComparison.OrdinalIgnoreCase))

This line does not match origin of * to any origin as string.Equals doe not account for regex.

Maybe something more like

Regex allowOriginRegex = new Regex(client.AllowedOrigin, RegexOptions.IgnoreCase);
if (!string.Equals(client.AllowedOrigin, redirectUri.GetLeftPart(UriPartial.Authority), StringComparison.OrdinalIgnoreCase) || allowOriginRegex.match( redirectUri.GetLeftPart(UriPartial.Authority))

O-Mutt avatar Dec 31 '15 20:12 O-Mutt