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