Firefox vs CrossSiteScripting

Posted on Dezember 16th, 2009 in Computer,PHP,Programmiersprachen by muhgatus

Nahmd,

ich hatte ein Problem mit einem Test, da Firefox seit der Version 3.5 etwas gegen CrossSiteScripting tut. Es wird nun nachgeschaut, ob das der Server auch wirklich haben will.

Folgendes musste ich in meine xmlrpc.php ergänzen, damit es wieder funktioniert..

  1. header(‘Access-Control-Allow-Origin: *’, true);
  2. header(‘Access-Control-Allow-Methods: POST, GET, OPTIONS’, true);
  3. header(‘Access-Control-Max-Age: 1728000′, true);
  4.  
  5. if ( $_SERVER['REQUEST_METHOD'] == "OPTIONS") {
  6.   ob_clean();
  7.   header(‘Content-Type: text/plain’, true);
  8.   exit;
  9. }

Mehr zu diesem Thema gibts von mozilla und vom W3C.

QR Code for Firefox vs CrossSiteScripting

Post a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word