diff --git a/src/Modules/ImageModule.cs b/src/Modules/ImageModule.cs index 11859f4..7cde77a 100644 --- a/src/Modules/ImageModule.cs +++ b/src/Modules/ImageModule.cs @@ -217,6 +217,11 @@ public async Task ReverseAsync([Summary(description: "The URL of public async Task ReverseAsync(string url, ReverseImageSearchEngine engine, bool multiImages, IDiscordInteraction interaction, IDiscordInteraction? originalInteraction = null, bool ephemeral = false) { + if (!Uri.IsWellFormedUriString(url, UriKind.Absolute)) + { + return FergunResult.FromError(_localizer["UrlNotWellFormed"], true, interaction); + } + _logger.LogDebug("Performing reverse image search (engine: {Engine}, multi-images: {MultiImages}, ephemeral: {Ephemeral})", engine, multiImages, ephemeral); return engine switch