Browse Source

Bug #4266 fix save a picture from photographic retouching

asus 13 years ago
parent
commit
1520ed46a7
1 changed files with 3 additions and 3 deletions
  1. 3 3
      main/document/save_pixlr.php

+ 3 - 3
main/document/save_pixlr.php

@@ -5,7 +5,7 @@
  *
  *	@package chamilo.document
  *
- * @author Juan Carlos Raa Trabado
+ * @author Juan Carlos Raña Trabado
  * @since 30/january/2011
 */
 /**
@@ -44,8 +44,8 @@ $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
 $saveDir=$dirBaseDocuments.$_SESSION['paint_dir'];
 $contents = file_get_contents($urlcontents);
 
-//Verify that the URL is pointing to a file @ pixlr.com
-if (strpos($urlcontents, "pixlr.com") == 0){
+//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){
   echo "Invalid referrer";
   exit;
 }