Problems getting new nonce for Ajax requests
-
I’m experiencing maddening problems in getting WordPress to generate a new nonce for subsequent Ajax requests to process a specific action. I’ve tried setting the nonce_life to something reasonably short, but that has caused other problems. I’ve tried creating a new nonce for the callback function with a unique timestamp or something similar, but then the value of the nonce can’t be compared against its name in the subsequent request.
At this stage I don’t know what to do. None of the suggestions I’ve read elsewhere from other folks are working– implementing those suggestions results in WordPress continuing to spit out a nonce that was the same as before.
I’ve referenced:
1) https://www.techytalk.info/securing-your-wordpress-plugin-ajax-calls-using-nonces/
2) https://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/
3) https://wp.tutsplus.com/tutorials/creative-coding/capabilities-and-nonces/
- The topic ‘Problems getting new nonce for Ajax requests’ is closed to new replies.