Describe the bug
This line in EmailService:
if (new Uri(returnTo).IsAbsoluteUri) throw new ArgumentException($"returnTo must be relative, was: {returnTo}", nameof(returnTo));
Is throwing:
returnTo must be relative, was: /api/User/acceptInvitation (Parameter 'returnTo')
Based on my fiddling, here are the options that seem to do what we're expecting:
new Uri(returnTo, UriKind.RelativeOrAbsolute).IsAbsoluteUriUri.IsWellFormedUriString(returnTo, UriKind.Absolute) or the inverse !Uri.IsWellFormedUriString(returnTo, UriKind.Relative)
Describe the bug This line in EmailService:
if (new Uri(returnTo).IsAbsoluteUri) throw new ArgumentException($"returnTo must be relative, was: {returnTo}", nameof(returnTo));
Is throwing:
returnTo must be relative, was: /api/User/acceptInvitation (Parameter 'returnTo')
Based on my fiddling, here are the options that seem to do what we're expecting:
new Uri(returnTo, UriKind.RelativeOrAbsolute).IsAbsoluteUri
Uri.IsWellFormedUriString(returnTo, UriKind.Absolute)
or the inverse!Uri.IsWellFormedUriString(returnTo, UriKind.Relative)