I'm developing a bespoke web system for a client using CodeIgniter and Ion Auth. Everything has been going fine so far however I have just come across an issue whereby if I try to set a password with an ampersand in, that user can no longer log in to the system.
At first I thought this issue may be related to character coding as I was setting the passwords manually using a literal string, however the same happens if I take the input directly from a HTML form. I haven't changed any encryption/hash settings in Ion Auth, only the site title, default user group, and the table attribute used for the username.
I'm using CodeIgniter 3 and Ion Auth. Please let me know if you need anymore information.
Any ideas what is happening here?
答案 0 :(得分:0)
我刚刚发现了这个问题,这让我觉得有点愚蠢,但我想我会让其他人都知道解决方案,因为如果我有这个问题,我和#39;我相信其他人一定会受到影响。
问题与Ion Auth无关,而是与我错误地使用CodeIgniter函数。为了从表单中获取密码,我使用set_value('password)
实际上将HTML的值转换为documented here和written about here。显然,只使用echo
打印密码,这是我试图调试的方式,我无法看到原始字符串以任何方式被改变,但它对哈希产生了影响。 / p>
解决方案就是简单地使用$this->input->post('password')
来获取密码,因为此功能不会对原始输入进行任何更改。
希望能有所帮助。故事的寓意是在开始使用它之前熟悉任何框架并彻底阅读文档。