WordPress nonces 存储在哪里? [英] Where Are WordPress nonces Stored?

查看:32
本文介绍了WordPress nonces 存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚 WordPress 将所有随机数存储在哪里.却找不到线索.我首先检查了数据库,但找不到任何名为 wp_nonces 之类的表.

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.

推荐答案

我在 11 个月前发布了这个问题.

I posted this question 11 months ago.

我收到的所有答案都很棒,对我帮助很大.

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

但是他们都没有提到 WordPress nonces 的存储位置.这就是我真正的问题所在.

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

于是,我挖出了 WordPress 源代码,并找到了 WordPress nonces 的正确存储位置.

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.

它们是存储在用户会话中的唯一令牌.Nonce 有明确的生命周期.

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

如果用户退出 WordPress,随机数将不再有效.

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

PS:我问了这个问题,现在我发布这个答案来帮助其他人:)

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

这篇关于WordPress nonces 存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆