Browse Source

fix invalid referred photo retouching

Juan Carlos Raña 13 years ago
parent
commit
97618a0d59
1 changed files with 2 additions and 3 deletions
  1. 2 3
      main/document/save_pixlr.php

+ 2 - 3
main/document/save_pixlr.php

@@ -43,13 +43,12 @@ $currentTool=$_SESSION['whereami'];
 $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
 $saveDir=$dirBaseDocuments.$_SESSION['paint_dir'];
 $contents = file_get_contents($urlcontents);
-
+echo $urlcontents;
 //Verify that the URL is pointing to a file @ pixlr.com domain or ip
-if (strpos($urlcontents, "pixlr.com") == 0 && strpos($urlcontents, "69.164.195.250") == 0){
+if (strpos($urlcontents, "pixlr.com") == 0 && strpos($urlcontents, "69.164.195.250") == 0 && strpos($urlcontents, "173.255.196.130") == 0){
   echo "Invalid referrer";
   exit;
 }
-
 //Verify that the file is an image
 $headers = get_headers($urlcontents, 1);
 $content_type = explode("/", $headers['Content-Type']);