mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 06:15:25 -04:00
15 lines
489 B
C#
15 lines
489 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace Kavita.API.Services;
|
|
|
|
public interface IUrlValidationService
|
|
{
|
|
/// <summary>
|
|
/// Validates that a URL is safe to fetch (SSRF protection).
|
|
/// Rejects non-HTTPS schemes, private/loopback IPs, and link-local addresses.
|
|
/// </summary>
|
|
/// <param name="url">The URL to validate</param>
|
|
/// <exception cref="Kavita.Common.KavitaException">Thrown when the URL fails validation</exception>
|
|
Task ValidateUrlAsync(string url);
|
|
}
|