mirror of
https://github.com/bitwarden/server.git
synced 2025-02-16 01:51:21 +01:00
ensure no path specific in duo host (#1985)
This commit is contained in:
parent
3ffd240287
commit
06c9b123f9
@ -46,7 +46,8 @@ namespace Bit.Core.Utilities.Duo
|
|||||||
{
|
{
|
||||||
if (Uri.TryCreate($"https://{host}", UriKind.Absolute, out var uri))
|
if (Uri.TryCreate($"https://{host}", UriKind.Absolute, out var uri))
|
||||||
{
|
{
|
||||||
return uri.Host.StartsWith("api-") &&
|
return (string.IsNullOrWhiteSpace(uri.PathAndQuery) || uri.PathAndQuery == "/") &&
|
||||||
|
uri.Host.StartsWith("api-") &&
|
||||||
(uri.Host.EndsWith(".duosecurity.com") || uri.Host.EndsWith(".duofederal.com"));
|
(uri.Host.EndsWith(".duosecurity.com") || uri.Host.EndsWith(".duofederal.com"));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user