Removed the operating-system sign-in for Confluence wikis with public addresses

This commit is contained in:
Thorsten Sommer committed 2026-09-23 16:35:42 +02:00
1 parent ad6b285c8d
commit 6afd724002
6 files changed
+8 -22

No files matched your search

@@ -34,14 +34,5 @@ public sealed class WebPageRetrievalOptions
/// </summary>
public Func<Uri, bool>? IsTargetAllowed { get; init; }
/// <summary>
/// Allows the operating system's sign-in for a host which resolves to public addresses.
/// </summary>
/// <remarks>
/// Without it, the sign-in is only sent to allowed private hosts. Use it only for a host
/// which the user or the organization configured, never for one a model named.
/// </remarks>
public Func<string, bool>? IsOsSsoAllowedForPublicHost { get; init; }
public Func<Uri, ConfidenceLevel, Task>? OnPrivateHostProviderBlockAsync { get; init; }
}
@@ -160,10 +160,9 @@ public sealed class WebPageRetrievalService(HTMLParser htmlParser)
originalUrl.Host.Equals(candidateUrl.Host, StringComparison.OrdinalIgnoreCase) &&
originalUrl.Port == candidateUrl.Port &&
!IsBlockedHostName(candidateUrl.Host) &&
options.IsPrivateHostAllowed?.Invoke(candidateUrl.Host) is true &&
addresses.Count > 0 &&
(addresses.All(IsNonPublicAddress)
? options.IsPrivateHostAllowed?.Invoke(candidateUrl.Host) is true
: options.IsOsSsoAllowedForPublicHost?.Invoke(candidateUrl.Host) is true);
addresses.All(IsNonPublicAddress);
private static IPAddress NormalizeAddress(IPAddress address) => address.IsIPv4MappedToIPv6 ? address.MapToIPv4() : address;