Skip to content

Fix app password updating out of bounds - #22524

Merged
rullzer merged 1 commit into
masterfrom
fix/apppassword_update
Sep 3, 2020
Merged

Fix app password updating out of bounds#22524
rullzer merged 1 commit into
masterfrom
fix/apppassword_update

Conversation

@rullzer

Copy link
Copy Markdown
Member

When your password changes out of bounds your Nextcloud tokens will
become invalid. There is no real way around that. However we should make
sure that if you successfully log in again your passwords are all
updates

  • Added event listener to the PostLoggedInEvent so that we can act on it
    • Only if it is not a token login
  • Make sure that we actually reset the invalid state when we update a
    token. Else it keeps being marked invalid and thus not used.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@@ -0,0 +1,53 @@
<?php
declare(strict_types=1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
declare(strict_types=1);
declare(strict_types=1);


$this->manager->updatePasswords($event->getUser()->getUID(), $event->getPassword());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change

@rullzerrullzer mentioned this pull request Sep 1, 2020
21 tasks

@nickvergessennickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good

@rullzerrullzer mentioned this pull request Sep 3, 2020
13 tasks
@faily-bot

faily-botBot commented Sep 3, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 32588: failure

mariadb10.4-php7.3

Show full log
There were 2 warnings:
1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
--
There was 1 failure:
1) Test\Share20\DefaultShareProviderTest::testDeleteSingleShare
Failed asserting that an array is empty.
/drone/src/tests/lib/Share20/DefaultShareProviderTest.php:486

mysql5.6-php7.2

Could not fetch logs

When your password changes out of bounds your Nextcloud tokens will
become invalid. There is no real way around that. However we should make
sure that if you successfully log in again your passwords are all
updates
* Added event listener to the PostLoggedInEvent so that we can act on it
- Only if it is not a token login
* Make sure that we actually reset the invalid state when we update a
token. Else it keeps being marked invalid and thus not used.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the fix/apppassword_update branch from b316fdf to 0452877CompareSeptember 3, 2020 19:13
@rullzerrullzer added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 3, 2020
@rullzer
rullzer merged commit 7b6f685 into masterSep 3, 2020
@rullzer
rullzer deleted the fix/apppassword_update branch September 3, 2020 20:00
@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable19

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

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

Labels

4. to releaseReady to be released and/or waiting for tests to finishbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@rullzer@nickvergessen@ChristophWurst@kesselb