Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where Are WordPress nonces Stored?

Tags:

php

wordpress

I was trying to figure out where does WordPress store all the nonces. But wasn't able to find a clue. I first checked the database but wasn't able to find any table named something like wp_nonces.

like image 354
Mohit Gangrade Avatar asked Jul 31 '15 10:07

Mohit Gangrade


1 Answers

I posted this question 11 months ago.

All the answers that I received were great and helped me a lot.

But none of them addressed the storage location of WordPress nonces. That's what my real question was.

So, I dug up WordPress source code and was able to find the correct storage location of WordPress nonces.

They are stored in user sessions.

They are unique tokens stored in user's session. Nonces have a defined life span.

If the user logs out of WordPress, the nonces will no longer be valid.

PS: I asked this question and now I am posting this answer to help others :)

like image 106
Mohit Gangrade Avatar answered Sep 29 '22 14:09

Mohit Gangrade