This adds a manually implemented hostname check that is applied as an endpoint filter. With the implemented filter, the validation rules are similar to those before Kestrel was introduced. This fixes #5469
15 lines
403 B
C#
15 lines
403 B
C#
namespace Duplicati.WebserverCore.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Interface for hostname validation
|
|
/// </summary>
|
|
public interface IHostnameValidator
|
|
{
|
|
/// <summary>
|
|
/// Validates a hostname
|
|
/// </summary>
|
|
/// <param name="hostname">The hostname to validate</param>
|
|
/// <returns>True if the hostname is valid, false otherwise</returns>
|
|
bool IsValidHostname(string hostname);
|
|
}
|