scratch – Diff between revs 87 and 93

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 87 Rev 93
Line 9... Line 9...
9 require_once('vendor/autoload.php'); 9 require_once('vendor/autoload.php');
Line 10... Line 10...
10   10  
11 ### Load configuration. 11 ### Load configuration.
Line -... Line 12...
-   12 $config = spyc_load_file('config.yaml');
-   13  
-   14 #### Script restrictions.
-   15 if(
-   16 (
-   17 !isset($_SERVER['HTTP_X_REQUESTED_WITH']) ||
-   18 empty($_SERVER['HTTP_X_REQUESTED_WITH']) ||
-   19 strtoupper($_SERVER['HTTP_X_REQUESTED_WITH']) != 'XMLHTTPREQUEST'
-   20 )
-   21 ||
-   22 (
-   23 (
-   24 !isset($_SERVER['HTTP_REFERER']) ||
-   25 empty($_SERVER['HTTP_REFERER'])
-   26 )
-   27 &&
-   28 (
-   29 #strtoupper($_SERVER['HTTP_REFERER']) != strtoupper($config['URL_PATH'].'FILE.HTML') ||
-   30 strtoupper($_SERVER['HTTP_REFERER']) != strtoupper($config['URL_PATH'].'TEXT.HTML')
-   31 )
-   32 )
-   33 )
-   34 {
-   35 http_response_code(403);
-   36 die('Forbidden.');
12 $config = spyc_load_file('config.yaml'); 37 }
13   38  
14 if(!isset($_POST['fingerprint']) or empty($_POST['fingerprint']) or 39 if(!isset($_POST['fingerprint']) or empty($_POST['fingerprint']) or
15 !isset($_POST['action']) or empty($_POST['action'])) { 40 !isset($_POST['action']) or empty($_POST['action'])) {
16 http_response_code(500); 41 http_response_code(500);