Dotclear


Ignore:
Timestamp:
03/14/13 09:46:33 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.5
Message:

Better way to prevent XSS vulnerabilities in swfupload.swf and other unwanted param in URL (thank's Julien Wajsberg)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/load_plugin_file.php

    r1115 r1116  
    4747} 
    4848 
    49 // Prevents XSS vulnerabilities in swfupload.swf 
    50 if (((isset($_GET['buttonText']) && strpos($_GET['buttonText'],'<') !== false) || 
    51      (isset($_GET['movieName']) && strpos($_GET['movieName'],';') !== false)) && 
    52      strpos($_GET['pf'],'swfupload.swf') !== false) { 
    53      { 
    54           header('Content-Type: text/plain'); 
    55           http::head(403,'Forbidden'); 
    56           exit; 
    57      } 
     49// Only $_GET['pf'] is allowed in URL 
     50if (count($_GET) > 1) 
     51{ 
     52    header('Content-Type: text/plain'); 
     53    http::head(403,'Forbidden'); 
     54    exit; 
    5855} 
    5956 
Note: See TracChangeset for help on using the changeset viewer.

Sites map