mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-08 05:04:04 +08:00
Merge remote-tracking branch 'EdOverflow/hash_equals'
This commit is contained in:
commit
f0e00c5704
1 changed files with 2 additions and 2 deletions
|
|
@ -142,7 +142,7 @@ class CredentialController extends ApiController {
|
|||
);
|
||||
|
||||
|
||||
if ($storedCredential->getUserId() !== $this->userId) {
|
||||
if (!hash_equals($storedCredential->getUserId(), $this->userId)) {
|
||||
$acl = $this->sharingService->getCredentialAclForUser($this->userId, $storedCredential->getGuid());
|
||||
if ($acl->hasPermission(SharingACL::WRITE)) {
|
||||
$credential['shared_key'] = $storedCredential->getSharedKey();
|
||||
|
|
@ -219,7 +219,7 @@ class CredentialController extends ApiController {
|
|||
'', array(),
|
||||
$link, $target_user, Activity::TYPE_ITEM_ACTION);
|
||||
}
|
||||
if ($this->userId !== $storedCredential->getUserId()) {
|
||||
if (!hash_equals($this->userId, $storedCredential->getUserId())) {
|
||||
$this->activityService->add(
|
||||
$activity, $params,
|
||||
'', array(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue