-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing
potential_dupes_ignoring_username()
This is another deprecated function, although it was still in use by the dupe checking code. So removing it required more effort. There was a lot of overlap between `potential_dupes_ignoring_username()` and `find_login_to_update()`. I factored out the common parts into the new `get_by_entry_target()` function. Naming this one was hard, but the idea is to search using `origin` plus either `form_action_origin` or `http_realm`. The new function has one difference from the old ones. It checks which of `form_action_origin` or `http_realm` is set and uses that as the query param, rather than throwing both in there. This means: - For valid login entries where exactly 1 is set, it works exactly the same, since NULL comparisons are always false. - If neither or both are set, it returns an error rather than running the query. I think in most cases that query would return 0 rows. This affected one thing, which was the dupe-checking in the migration function tests. I think this was maybe a test-only issue, since we currently don't clear `form_action_origin` and `http_realm` when deleting the login (#4573). I'm not sure what desktop does though. In any case, I think not running the dupe check for deleted logins makes the migration logic slightly safer.
- Loading branch information
Showing
4 changed files
with
78 additions
and
91 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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