Each repository ID should increment by between 2^16 and 2^24 to avoid easy guessing
authorDouglas Fraser <douglas.fraser@cloudreach.com>
Mon, 4 Sep 2017 21:41:29 +0000 (23:41 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 13 Oct 2017 16:21:26 +0000 (18:21 +0200)
src/phorkie/Repositories.php

index e0a3985aa461a73fa4be139b5862857fb11744f6..7ed3188e383ec61f5bb11f2cf05496d6bc12abc4 100644 (file)
@@ -23,7 +23,7 @@ class Repositories
             }
         );
         sort($dirs, SORT_NUMERIC);
-        $n = end($dirs) + 1;
+        $n = end($dirs) + mt_rand(65536, 16777216);
 
         chdir($this->workDir);
         $dir = $this->workDir . '/' . $n . '/';