Where Are WordPress nonces Stored?

后端 未结 3 853
闹比i
闹比i 2021-02-19 18:03

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

    Nonces are not stored directly anywhere, they are created using the function wp_create_nonce and validated using the wp_verify_nonce.

    Those functions in turn use wp_hash to hash together a lifespan, a custom string, the user_id and the session token stored in wp_usermeta with the key session_tokens.

提交回复
热议问题