]> jfr.im git - uguu.git/commitdiff
Merge pull request #3 from nixxquality/nixxquality-patch-1
authorEric Johansson (neku) <redacted>
Wed, 18 Feb 2015 14:25:18 +0000 (15:25 +0100)
committerEric Johansson (neku) <redacted>
Wed, 18 Feb 2015 14:25:18 +0000 (15:25 +0100)
URL encode the returned filename

includes/core.php

index 80cd0b68f60f0d4adeceff4f3b47422a248f6bdf..8e4c0bff71f035d7fe58ecc3ec3684bc3389e232 100644 (file)
@@ -1,4 +1,4 @@
-?php
+<?php
 function save_file ($file, $name, $arg){
     //Where to save
     $path='/home/neku/www/files/';
@@ -22,7 +22,7 @@ function save_file ($file, $name, $arg){
     //Move the file to the above location with said filename
     move_uploaded_file($file,$path.$file_name);
     //Return url+filename to the user
-    echo 'http://a.uguu.se/'.$file_name;
+    echo 'http://a.uguu.se/'.urlencode($file_name);
 }
 function gen_name($arg, $in){
     $chars = 'abcdefghijklmnopqrstuvwxyz';