Q:

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?

A:

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.

