diff options
Diffstat (limited to 'paste/include')
-rw-r--r-- | paste/include/storage/FileStorage.php | 2 | ||||
-rw-r--r-- | paste/include/storage/MysqlStorage.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/paste/include/storage/FileStorage.php b/paste/include/storage/FileStorage.php index a6ea0f2..09b222f 100644 --- a/paste/include/storage/FileStorage.php +++ b/paste/include/storage/FileStorage.php @@ -47,7 +47,7 @@ class FileStorage extends StorageEngine global $config; do { - $filename = sha1(date('r') . rand(1000)); + $filename = sha1(date('r') . rand(1000, getrandmax())); } while (file_exists(realpath($storage_path . '/' , $filename))); if ($config['short_results_path']) { diff --git a/paste/include/storage/MysqlStorage.php b/paste/include/storage/MysqlStorage.php index 239f113..d15de55 100644 --- a/paste/include/storage/MysqlStorage.php +++ b/paste/include/storage/MysqlStorage.php @@ -69,7 +69,7 @@ FULLTEXT INDEX (content) public function setContent($content) { - $name = sha1(date('r') . rand(1000)); + $name = sha1(date('r') . rand(1000, getrandmax())); if ($config['short_results_path']) { $urlbase = $config['short_results_path']; |