Commit 743a26be4f65e0477fcd2f4fbe612f1e8c5d2670

Authored by Edmar Moretti
1 parent 4e38f5b0
Exists in master

Validação da string SVG no conversor svg para png

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
pacotes/svg2img.php
1 1 <?php
2 2 define(I3GEO,true);
3 3 include("validaacesso.php");
  4 +if(simplexml_load_string($_POST["svg"])===FALSE) {
  5 + die;
  6 +}
4 7 ?>
5 8 <html>
6 9 <head>
... ... @@ -30,6 +33,6 @@ function render(svg, w, h) {
30 33 Canvas2Image.saveAsPNG(oCanvas,false,w,h);
31 34 }});
32 35 }
33   -render('<?php echo $_POST["svg"];?>',<?php echo $_GET["w"];?>,<?php echo $_GET["h"];?>);
  36 +render('<?php echo $_POST["svg"];?>',<?php echo (int) $_GET["w"];?>,<?php echo (int) $_GET["h"];?>);
34 37 </script>
35 38 </html>
36 39 \ No newline at end of file
... ...