Code Igniter:不同浏览器中不允许使用的关键字符
我一直在 codeigniter 中开发我的第一个应用程序。昨晚一切正常,但是当我今天早上启动它时,我收到错误“不允许的关键字符”,但后来意识到这个错误只发生在 Firefox 和 Firefox 中。不是 Safari(网站加载正常)?
我需要注意“不允许的关键字符”的哪些问题,以确保我的应用程序与所有浏览器(和 cookie 设置?)兼容。
谢谢!
-- 更新-清除cookie有效.:.允许 ci_session,尽管这些是本地主机 (MAMP) 上不同应用程序 (textpattern) 的 cookie - 所以再说一次,我应该注意 cookie 和 ci_session。代码点火器?
I've been developing my first app in codeigniter. It was all working fine last night but when I fired it up this morning I got the error 'Disallowed Key Characters', but then realized this error was only occuring in Firefox & not Safari (where the site loads fine)?
What issues do I need to look out for with 'Disallowed Key Characters', to make sure my app is compatible with all browsers (& cookie settings?).
Thanks!
--
Update- clearing cookies worked .:. allowed ci_session, although these were cookies for a different app (textpattern) on localhost (MAMP)- so again, what should I watch out for with cookies & code igniter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所确定的,cookie 可能是导致此问题的原因,
如果不了解有关设置的更多信息,很难确定,但也许您的 cookie KEY 包含无效字符?我不相信该值有任何影响。
有一些资源可以显示 CI 接受和不接受的内容 - 出于安全原因,它对无效字符(例如
\n \r
以及许多其他字符)非常挑剔,请参阅 此线程 解决类似的问题
as you've identified, cookies can be a cause of this problem
without knowing more about the setup it's hard to be sure, but perhaps your cookies KEY contained an invalid character? I don't believe the value has any effect.
there's a few resources about showing what CI acceps and doesn't - it's pretty picky about invalid characters (such as
\n \r
as well as a host of others ) for security reasonsSee this thread for a similar sounding problem