X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/ef377224ff62ab7068390672b36e7f475200fcfe..f89474388394d7a7fd7dbb41f089956454e4957f:/lib/functions.php diff --git a/lib/functions.php b/lib/functions.php index b658b17..87d2cff 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -329,7 +329,7 @@ jirafeau_upload ($file, $one_time_download, $key, $time, $ip) /* file informations */ $md5 = md5_file ($file['tmp_name']); - $name = trim ($file['name']); + $name = str_replace (NL, '', trim ($file['name'])); $mime_type = $file['type']; $size = $file['size']; @@ -801,9 +801,10 @@ jirafeau_async_init ($filename, $type, $one_time, $key, $time, $ip) $p .= $ref; $handle = fopen ($p, 'w'); fwrite ($handle, - $filename . NL. $type . NL. $password . NL. $time . NL . - ($one_time ? 'O' : 'R') . NL . $ip . NL . date ('U') . NL . - $code . NL); + str_replace (NL, '', trim ($filename)) . NL . + str_replace (NL, '', trim ($type)) . NL . $password . NL . + $time . NL . ($one_time ? 'O' : 'R') . NL . $ip . NL . + date ('U') . NL . $code . NL); fclose ($handle); return $ref . NL . $code ;