Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / dom-crawler / Field / FileFormField.php
index 0e0f94347a5ee8b5737e991de32ec40ec4cc24e5..fc21239f0105938b011ca4e3eb3dda655eaad08e 100644 (file)
@@ -59,7 +59,7 @@ class FileFormField extends FormField
             $name = $info['basename'];
 
             // copy to a tmp location
-            $tmp = sys_get_temp_dir().'/'.sha1(uniqid(mt_rand(), true));
+            $tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), 0, 7), '/', '_');
             if (array_key_exists('extension', $info)) {
                 $tmp .= '.'.$info['extension'];
             }