MDL-29257 use more entropy in ws upload
[moodle.git] / 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'])) {
         $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'];
         }
         } else {
             $filename = $fileinfo['filename'];
         }