[Pkg-owncloud-commits] [owncloud] 130/273: Use get random bytes as uniqeid() is not unique in some cases
David Prévot
taffit at moszumanska.debian.org
Fri Jul 4 03:13:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 0c711e1cfa204fcdc3ba6ac4cc38b7b881c1c246
Author: Joas Schilling <nickvergessen at gmx.de>
Date: Mon Jun 30 11:03:24 2014 +0200
Use get random bytes as uniqeid() is not unique in some cases
Fix #9161
---
lib/private/db/migrator.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php
index 8dbfabe..6443cf4 100644
--- a/lib/private/db/migrator.php
+++ b/lib/private/db/migrator.php
@@ -84,7 +84,7 @@ class Migrator {
* @return string
*/
protected function generateTemporaryTableName($name) {
- return 'oc_' . $name . '_' . uniqid();
+ return 'oc_' . $name . '_' . \OCP\Util::generateRandomBytes(13);
}
/**
@@ -133,7 +133,7 @@ class Migrator {
$indexName = $index->getName();
} else {
// avoid conflicts in index names
- $indexName = 'oc_' . uniqid();
+ $indexName = 'oc_' . \OCP\Util::generateRandomBytes(13);
}
$newIndexes[] = new Index($indexName, $index->getColumns(), $index->isUnique(), $index->isPrimary());
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list