Skip to content

Commit 7558f07

Browse files
Blaklisbsweeney
authored andcommitted
SVG parsing - comparing the tag name in a case insensitive way
This patch will avoid bypassing the uri validation if the tag name have some uppercased letters.
1 parent ae1ca4a commit 7558f07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Image/Cache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static function resolve_url($url, $protocol, $host, $base_path, Options $options
133133
xml_set_element_handler(
134134
$parser,
135135
function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) {
136-
if ($name === "image") {
136+
if (strtolower($name) === "image") {
137137
$attributes = array_change_key_case($attributes, CASE_LOWER);
138138
$url = $attributes["xlink:href"] ?? $attributes["href"];
139139
if (!empty($url)) {

0 commit comments

Comments
 (0)