Security

AJAX Security Fail

Submitted by Joshua Rogers on Mon, 05/04/2009 - 20:58

Take a look at the following code sample.  It appeared in an AJAX book that was published by a reputable book publisher.

 

<?php
header("Content-Type: text/xml");
header("Cache-Control: no-cache");

if ( isset( $_GET["url"] ) ) {
    $remoteUrl = $_GET["url"];

    $xml = file_get_contents($remoteUrl);

    echo $xml;
}
?> 

Subscribe to RSS - Security