Where Are WordPress nonces Stored?

后端 未结 3 1419
灰色年华
灰色年华 2021-02-19 18:02

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 some

3条回答
  •  情话喂你
    2021-02-19 18:38

    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 :)

提交回复
热议问题