1

The URI I meant with is namely:

/ar/users/verify/5454kj/said%40kdfdsf.dff

Where the last URI segment is an email address encoded using the PHP function urlencode. The application/config/config.php permitted_uri_chars has the follwoing value:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; so % and . are permitted. So what is the problem? does it a bug in CodeIgniter 2.2.0? Does it related with IIS?

SaidbakR
  • 13,303
  • 20
  • 101
  • 195
  • How are you using this URI and what's the error you're getting? – Dan Sep 18 '14 at 21:26
  • I use it in verification code email link. The error is: `The URI you submitted has disallowed characters.` – SaidbakR Sep 18 '14 at 21:29
  • `http://mywebsite.com/ar/users/verify/aZeAbh6Of12zM8rjFOSsW084M433tS5G1999/said%40email.com` I receive this in verify action which is defined as `public function verify($code = null, $email = null){}` – SaidbakR Sep 18 '14 at 21:34

1 Answers1

2

The %40 is causing an issue and is disallowed since it is interpreted as @. This question explains this issue as well: Codeigniter Redirect -- The URI you submitted has disallowed characters

You are better off passing the email as a query string value http://mywebsite.com/ar/users/verify/aZeAbh6Of12zM8rjFOSsW084M433tS5G1999?email=said@email.com which will work properly (assuming that you have query strings enabled).

Another option is to edit your $config['permitted_uri_chars'] to allow for @.

Community
  • 1
  • 1
Dan
  • 9,391
  • 5
  • 41
  • 73