MDL-29257 use more entropy in ws upload
authorPetr Skoda <commits@skodak.org>
Sat, 10 Sep 2011 10:06:59 +0000 (12:06 +0200)
committerPetr Skoda <commits@skodak.org>
Sat, 10 Sep 2011 10:06:59 +0000 (12:06 +0200)
files/externallib.php

index eba388b..dc351b6 100644 (file)
@@ -210,7 +210,7 @@ class moodle_file_external extends external_api {
         $dir = make_upload_directory('temp/wsupload');
 
         if (empty($fileinfo['filename'])) {
-            $filename = uniqid('wsupload').'_'.time().'.tmp';
+            $filename = uniqid('wsupload', true).'_'.time().'.tmp';
         } else {
             $filename = $fileinfo['filename'];
         }