Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The URI you submitted has disallowed characters. encode var in URL

I have a registration form in my application. When someone complete the registration receive an email with a link to confirm registration (typical situation).

The link is something like this

http://www.myDomain.com/registration/validation/m0NQGT4XzQgId5zuH/1PrDqNSP7YWq81Mba8cSXLb1WsQ5aVqf2sQ3Ece3ZdmxYvLjztaGp7Xmhv8ArjFET/8Q==

  • registration is the controller
  • validation is the function
  • and the last one is the username

Encoding the username:

$encrypted_username = $this->encrypt->encode($username);

But, accessing the link returns the following error

The URI you submitted has disallowed characters.

Setting $config['permitted_uri_chars'] = ''; everything goes right, but they say we shouldn't do this.

So, how can I solve this problem right?

like image 932
user1910232 Avatar asked Dec 21 '12 16:12

user1910232


1 Answers

I changed my config.php to

$config['permitted_uri_chars'] = '+=\a-z 0-9~%.:_-';

and now is working fine, I hope this is a safe solution.

like image 131
user1910232 Avatar answered Oct 20 '22 00:10

user1910232