Skip to content

Commit 3334609

Browse files
Disallow data URIs
1 parent 32e400b commit 3334609

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ImageSharp.Web/TagHelpers/ImageTagHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
198198
Guard.NotNull(output, nameof(output));
199199

200200
string src = output.Attributes[SrcAttributeName]?.Value as string ?? this.Src;
201-
if (string.IsNullOrWhiteSpace(src))
201+
if (string.IsNullOrWhiteSpace(src) || src.StartsWith("data", StringComparison.OrdinalIgnoreCase))
202202
{
203+
base.Process(context, output);
203204
return;
204205
}
205206

0 commit comments

Comments
 (0)