Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification token does not get deleted on reset #771

Closed
felixarntz opened this issue Nov 2, 2019 · 1 comment
Closed

Verification token does not get deleted on reset #771

felixarntz opened this issue Nov 2, 2019 · 1 comment
Labels
P0 High priority Type: Bug Something isn't working
Milestone

Comments

@felixarntz
Copy link
Member

felixarntz commented Nov 2, 2019

Bug Description

When resetting the plugin before a user has received an access token, any other user data that might already be present in the database is not cleared.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • When resetting the plugin, all Site Kit user data should be cleared, also when the user does not have an access token yet.

Implementation Brief

  • In order to determine all the users which need to have their Site Kit data cleared, we need to modify the query to check for any of the meta keys that are set for the user potentially before they have an access token:
    • Verification_Tag::OPTION
    • OAuth_Client::OPTION_PROXY_ACCESS_CODE
    • OAuth_Client::OPTION_ERROR_CODE
  • We can do that with a meta_query using OR subqueries.
  • This should happen in the Reset class and (although that is not as crucial) also in the Migration_1_0_0 class.

Changelog entry

  • Ensure verification tokens and other plugin user data correctly get cleared when resetting the plugin before the user has authenticated.
@felixarntz felixarntz added Type: Bug Something isn't working P0 High priority Size: XXS labels Nov 2, 2019
@felixarntz felixarntz added this to the 1.0.1 milestone Nov 2, 2019
@felixarntz felixarntz assigned ThierryA, felixarntz and ernee and unassigned ThierryA and ernee Nov 2, 2019
@felixarntz
Copy link
Member Author

QA ✅

After clicking reset, the googlesitekit_site_verification_meta user option is wiped from the DB.

@felixarntz felixarntz removed their assignment Nov 2, 2019
@ThierryA ThierryA modified the milestones: 1.0.1, Sprint 10 Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants