Explorar o código

New finding by Static Code Analysis: revert uniqid() to comply long path requirements

Vladimir Reznichenko %!s(int64=6) %!d(string=hai) anos
pai
achega
6f6d59426d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Composer/Package/Archiver/ArchiveManager.php

+ 2 - 2
src/Composer/Package/Archiver/ArchiveManager.php

@@ -144,7 +144,7 @@ class ArchiveManager
             $sourcePath = realpath('.');
         } else {
             // Directory used to download the sources
-            $sourcePath = sys_get_temp_dir().'/composer_archive'.uniqid('', true);
+            $sourcePath = sys_get_temp_dir().'/composer_archive'.uniqid();
             $filesystem->ensureDirectoryExists($sourcePath);
 
             // Download sources
@@ -161,7 +161,7 @@ class ArchiveManager
         }
 
         // Create the archive
-        $tempTarget = sys_get_temp_dir().'/composer_archive'.uniqid('', true).'.'.$format;
+        $tempTarget = sys_get_temp_dir().'/composer_archive'.uniqid().'.'.$format;
         $filesystem->ensureDirectoryExists(dirname($tempTarget));
 
         $archivePath = $usableArchiver->archive($sourcePath, $tempTarget, $format, $package->getArchiveExcludes(), $ignoreFilters);