Repository navigation
fix: only accept and update WordPress passwords of linked accounts - #30
Merged
vitormattos merged 1 commit intoNov 14, 2026
Conversation
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
vitormattos
approved these changes
Nov 14, 2026
vitormattos
merged commit Nov 14, 2026
87bcc18
into
fix/add-command-to-link-wordpress-users
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
user_login, including accounts that never came from WordPress (group members, admins, service accounts).BeforePasswordUpdatedEvent, so a password later refused by Nextcloud was already written to WordPress.user_loginoruser_emailand compared with the database collation, so the same uid could resolve to a different WordPress user (another user's e-mail, or a login differing only in case), and the backend took the first row returned.What changed
wordpress_login(appwordpress_login_backend) is exactly its uid and a WordPress user has exactly thatuser_login. The lookup filters the rows in PHP, so custom queries are covered too, andcheckPasswordreturns the Nextcloud uid.PasswordUpdatedEvent, returns early for accounts without the same link, and logs a failed WordPress update instead of throwing after Nextcloud already changed the password. It was renamed toPasswordUpdatedListener.HEX(user_login) = HEX(:username)keeps the comparison byte exact on case insensitive collations);get_disabled_usersno longer searches e-mails.Db\WordPressUsers, shared with the link command.Dependencies and merge order
occ wordpress-login-backend:link-users.How it was verified
user_login, like MySQL; the tests fail onmain.composer run lintandcomposer run test:unitpass locally.