Skip to content

Conversation

@kesselb
Copy link
Collaborator

@kesselb kesselb commented Aug 18, 2019

Fix #16729

Argument 1 passed to OC\Security\Crypto::decrypt() must be of the type string, null given

Fix Argument 1 passed to OC\Security\Crypto::decrypt() must be of the type string, null given

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added this to the Nextcloud 17 milestone Aug 18, 2019
@kesselb kesselb requested review from MorrisJobke and rullzer August 18, 2019 18:00
@rullzer rullzer mentioned this pull request Aug 18, 2019
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@rullzer rullzer requested a review from juliusknorr August 18, 2019 19:27
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
Copy link
Collaborator Author

kesselb commented Aug 18, 2019

image

Looks unrelated to me.

$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('isEnabled')
->willReturn(false);
$user->expects($this->never())
->method('setPassword');
$this->config->method('getUserValue')
->with('ValidTokenUser', 'core', 'lostpassword', null)
->willReturn('encryptedData');
$this->userManager->method('get')
->with('DisabledUser')
->willReturn($this->existingUser);

We should return $user instead of $this->existingUser here. Not sure why this is going to break now 🙈

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@rullzer
Copy link
Member

rullzer commented Aug 19, 2019

O lol. So the test was wrong. We just never noticed because we catched \Exception.
Good stuff

@rullzer rullzer requested a review from blizzz August 19, 2019 14:16
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@blizzz blizzz merged commit 6d20876 into master Aug 21, 2019
@blizzz blizzz deleted the fix/16729/stop-if-encrypted-token-null branch August 21, 2019 10:31
@rullzer
Copy link
Member

rullzer commented Oct 22, 2019

/backport to stable16

@backportbot-nextcloud
Copy link

backport to stable16 in #17648

@solracsf
Copy link
Member

@kesselb still facing same issue on NC 17.0.2.

[cron] Error: TypeError: Argument 1 passed to OC\Security\Crypto::decrypt() must be of the type string, bool given,
called in /srv/lib/private/Security/IdentityProof/Manager.php on line 113 at <<closure>>

0. /srv/lib/private/Security/IdentityProof/Manager.php line 113
   OC\Security\Crypto->decrypt("*** sensitive parameters replaced ***")
1. /srv/lib/private/Security/IdentityProof/Manager.php line 130
   OC\Security\IdentityProof\Manager->retrieveKey("user-u221218")
2. /srv/lib/private/Security/IdentityProof/Signer.php line 62
   OC\Security\IdentityProof\Manager->getKey(OC\User\User {})
3. /srv/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php line 142
   OC\Security\IdentityProof\Signer->sign("lookupserver", {federationId: " ... "}, OC\User\User {})
4. /srv/lib/public/BackgroundJob/Job.php line 77
   OCA\LookupServerConnector\BackgroundJobs\RetryJob->run({userId: "u221218"})
5. /srv/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php line 105
   OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
6. /srv/cron.php line 124
   OCA\LookupServerConnector\BackgroundJobs\RetryJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

@kesselb
Copy link
Collaborator Author

kesselb commented Jan 16, 2020

still facing same issue on NC 17.0.2.

Trace is different to: #16729 (comment). Please create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal Server Error with stack trace when trying to change password twice from forgot-password email

6 participants