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

[BUGS-8452] remove nonce_life filter #293

Merged
merged 30 commits into from
Aug 6, 2024

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Aug 6, 2024

Removes the add_filter to hook pantheon_cache_default_max_age to nonce_life minus 1 hour. This was overriding the cache age and hard-coding cache lifetimes to 23 hours.

Instead, this is replaced by a new action, pantheon_cache_nonce_lifetime which can be called in a do_action when needed.

Behat tests Blocked by pantheon-systems/pantheon-wordpress-upstream-tests#67

this way it's easier to debug because we can show people where they've added the filter
if it's in an anonymous function, we note that.
so we don't need to reset it to the string we want to output later
these aren't valid versions, so version_compare freaks out and (incorrectly) flags 6.7-alpha-whatever as less than 6.7 🤦‍♂️
instead define an action that can be called by users
reframe this to be used in a `do_action` by customers who are need to make this change to alter the cache lifetime for nonces
@jazzsequence jazzsequence requested a review from a team as a code owner August 6, 2024 16:25
Base automatically changed from bugs-8452-add-callback-info-to-filtered-message to develop August 6, 2024 16:58
we can assume the setting doesn't exist
we're testing this with unit tests and this is being annoying in behat
Copy link
Contributor

github-actions bot commented Aug 6, 2024

Composer Changes

Dev Packages Operation Base Target
automattic/vipwpcs Upgraded 3.0.0 3.0.1
myclabs/deep-copy Upgraded 1.11.1 1.12.0
nikic/php-parser Upgraded v5.0.2 v5.1.0
pantheon-systems/pantheon-wordpress-upstream-tests Changed dev-master 612d7d3 dev-master c925c38
pantheon-systems/pantheon-wp-coding-standards Upgraded 2.0.1 2.0.3
phpcsstandards/phpcsutils Upgraded 1.0.11 1.0.12
phpstan/phpdoc-parser Upgraded 1.29.0 1.29.1
phpunit/phpunit Upgraded 9.6.19 9.6.20
sirbrillig/phpcs-variable-analysis Upgraded v2.11.18 v2.11.19
spryker/code-sniffer Upgraded 0.17.23 0.17.24
squizlabs/php_codesniffer Upgraded 3.9.2 3.10.2
symfony/console Upgraded v5.4.39 v5.4.42
symfony/css-selector Upgraded v5.4.39 v5.4.40
symfony/event-dispatcher Upgraded v5.4.39 v5.4.40
symfony/filesystem Upgraded v5.4.39 v5.4.41
symfony/polyfill-ctype Upgraded v1.29.0 v1.30.0
symfony/polyfill-intl-grapheme Upgraded v1.29.0 v1.30.0
symfony/polyfill-intl-idn Upgraded v1.29.0 v1.30.0
symfony/polyfill-intl-normalizer Upgraded v1.29.0 v1.30.0
symfony/polyfill-mbstring Upgraded v1.29.0 v1.30.0
symfony/polyfill-php72 Upgraded v1.29.0 v1.30.0
symfony/polyfill-php73 Upgraded v1.29.0 v1.30.0
symfony/polyfill-php80 Upgraded v1.29.0 v1.30.0
symfony/polyfill-php81 Upgraded v1.29.0 v1.30.0
symfony/string Upgraded v6.4.7 v6.4.10
symfony/yaml Upgraded v6.4.7 v6.4.8
symfony/process Removed v6.4.7 -

@jazzsequence jazzsequence merged commit 2b55db2 into develop Aug 6, 2024
11 checks passed
@jazzsequence jazzsequence deleted the bugs-8452-remove-nonce-life-filter branch August 6, 2024 21:52
@jazzsequence jazzsequence mentioned this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants