Invalid character on Url error |
[eluser]Arun Joshi[/eluser]
Hi, In my site am trying to activate a user when he click on the activation link on his email. In myaddress i have user email address. So the '@' symbol on email address causing the following error. How can I solve this? An Error Was Encountered Code: The URI you submitted has disallowed characters. Code: http://mysite.com/activation/[email protected]/01c19622adc2d47749353b7aae785829 I tried urlencode(), but didnt work. Thanks Arun
[eluser]mddd[/eluser]
You can set the allowed url characters in config/config.php. If you add the @ to them, it will work like you want to. Of course, if someone had an email address containing another illegal character you would have the same problem. You could also solve it by not using the email address in the activation link but some other unique id.
[eluser]ELRafael[/eluser]
Do NOT allow @ char!! You can break down your security! Try do replace the @. Code: str_replace('@', 'at', $email) Or, transform the email into a token, or something else Code: $email = md5($email); Then you can check using this way: Code: if ( md5($this->uri->segment(n)) == md5($email) )
|
Welcome Guest, Not a member yet? Register Sign In |