Clarification on nonce caching and LS settings
-
Hi,
We develop a number of plugins and in one recently we have been made aware of and replicated an issue with nonce fields that we set in front end forms.
These forms have nonce fields added via either
wp_nonce_field
orwp_create_nonce
.What we have found is that when LiteSpeed Cache is enabled pages containing these nonces are cached and get served up to other users, the nonce is therefore incorrect and it causes functionality based off those nonces to fail due to a validation error.
I have read up on this and noted this article and a few others.
However i’d like some clarity on exactly how someone with this issue can resolve the problem without disabling the entire cache.
I understand that “Enable ESI” seems to be the solution and then adding in some of the nonce names to the ESI Nonces field in LiteSpeed Cache settings, however the description under the “Enable ESI” setting seems to allude to that setting being a cache for logged in users only?
I’m just trying to determine exactly which settings need to be enabled to stop specific nonce fields being cached – which in turn should stop the issues with invalid nonces for our plugin.
Thank you,
- The topic ‘Clarification on nonce caching and LS settings’ is closed to new replies.