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

Activate notoptions corruption detection + mitigation by requiring file #1977

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

nickdaugherty
Copy link
Contributor

@nickdaugherty nickdaugherty commented Feb 8, 2021

Description

The detection and mitigation code is already committed, now we need to activate it now by requiring the file.

See #1970

Changelog Description

Options: Activate notoptions error detection and mitigation code

Activated the already-deployed code to detect and mitigate problems with the notoptions cache.

Checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • n/a This change has relevant unit tests (if applicable).
  • n/a This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Steps to Test

  1. Try regular requests with valid notoptions - should see normal behavior
  2. Purposefully pollute the notoptions cache with invalid data (via wp shell):
$notoptions = wp_cache_get( 'notoptions', 'options' );
$notoptions['somekey'] = 'anystring';
wp_cache_set( 'notoptions', $notoptions, 'options' );
  1. Run a CLI command (to trigger the detection code): wp option get home
  2. Check the value of the notoptions cache - the somekey invalid data should be removed - wp cache get notoptions options

Code already committed, just need to activate it now by requiring the file
Copy link
Contributor

@rinatkhaziev rinatkhaziev left a comment

Choose a reason for hiding this comment

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

:shipit:

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

Successfully merging this pull request may close these issues.

3 participants