CodeIgniter Forums
The URI you submitted has disallowed characters? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: The URI you submitted has disallowed characters? (/showthread.php?tid=18986)

Pages: 1 2


The URI you submitted has disallowed characters? - El Forum - 05-24-2009

[eluser]ownersbox[/eluser]
Thank you for the link. I don't think I understand how to properly use the routes

if I want my link to be mydomain.com/verify/EMAIL/HASH

I added this route: $route['verify/(:any)/(:any)'] = "verify/";

But I still get the 404, what part did I misunderstand?

I also tried: $route['verify/(:any)'] = "verify/"; and $route['verify/(:any)'] = "verify";


The URI you submitted has disallowed characters? - El Forum - 05-24-2009

[eluser]Dam1an[/eluser]
Based on the way I suggested earlier, this is the route I would use
Code:
$route['verify/(:any)/(:any)'] = 'account/verify/$1/$2';

// And then in the account controller, add
function verify($email, $hash) {
  // verify the user
}



The URI you submitted has disallowed characters? - El Forum - 05-24-2009

[eluser]ownersbox[/eluser]
Thanks for all your help, your method worked then I ran in to another issue where a dot was being converted to an underscore and I found another thread you were part of showing me how to solve that... Thanks again

http://ellislab.com/forums/viewthread/114218/#578644


The URI you submitted has disallowed characters? - El Forum - 05-25-2009

[eluser]Dam1an[/eluser]
Glad its all working now Smile
(Also, it appears I appear in too many threads Tongue)


The URI you submitted has disallowed characters? - El Forum - 05-25-2009

[eluser]The Spider[/eluser]
Hi,
What will happen if we give $config[‘permitted_uri_chars’]='' in config.php?
I have to search for keywords entered in a text box. The problem is that I am getting the message "The URI you submitted has disallowed characters." whenever the keyword contain single quote, + sign etc.
When I edited $config[‘permitted_uri_chars’]='', everything looks fine.
Can anyone tell me, is there any problem in doing this?

Thanks in advance.


The URI you submitted has disallowed characters? - El Forum - 05-26-2009

[eluser]ownersbox[/eluser]
it becomes a security issue, allowing all characters would provide a way to try to execute from the url

Why not add characters you need to the default setting


The URI you submitted has disallowed characters? - El Forum - 05-26-2009

[eluser]Dam1an[/eluser]
I think the comment in the config files is clear enough that its not a good idea to allow all
Quote:/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify with a regular expression which characters are permitted
| within your URLs. When someone tries to submit a URL with disallowed
| characters they will get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';



The URI you submitted has disallowed characters? - El Forum - 05-26-2009

[eluser]The Spider[/eluser]
Ok. Thanks.
Suppose I want to add '(single quotes), "(double quotes) and + sign. How can I edit the default setting to add these?