1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-28 10:24:11 +01:00

Fix randomness

This commit is contained in:
Roeland Jago Douma 2016-01-13 19:35:22 +01:00
parent 00835612c3
commit 70e7c8d8dd

View File

@ -96,7 +96,7 @@ class Mock extends AbstractBackend {
return false;
}
$id = \OC::$server->getSecureRandom()->generate('4');
$id = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate('4');
$this->addressBooks[] = array_merge($properties, array(
'id' => $id,
'permissions' => \OCP\PERMISSION_ALL,
@ -162,7 +162,7 @@ class Mock extends AbstractBackend {
function createContact($addressBookId, $contact, array $options = array()) {
$id = \OC::$server->getSecureRandom()->generate('4');
$id = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate('4');
$this->contacts[$addressBookId][$id] = array(
'id' => $id,
'displayname' => $contact->FN,