Unsafe handling of SVG Path
-
Hi, thank you for this plugin.
Please consider the following change to line 40 of /svg-support/functions/attachment-modal.php
function bodhi_svgs_get_dimensions( $svg ) { $svg = @simplexml_load_file( $svg ); // add @ or otherwise validate this // check this uses basepath() // check the file exists // check the file is readable // check this is an SVG if ( $svg === FALSE ) { $width = '0'; $height = '0'; } else { $attributes = $svg->attributes(); $width = (string) $attributes->width; $height = (string) $attributes->height; } return (object) array( 'width' => $width, 'height' => $height ); }
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Unsafe handling of SVG Path’ is closed to new replies.