Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request URI and URL should NOT be rawurldecoded #632

Open
kohamkohane opened this issue Aug 14, 2015 · 0 comments
Open

Request URI and URL should NOT be rawurldecoded #632

kohamkohane opened this issue Aug 14, 2015 · 0 comments
Milestone

Comments

@kohamkohane
Copy link

Request->uri()
and
Request->url()
should return original (not decoded) URL like in $_SERVER['REQUEST_URI']

URL should always be correct (rawurlencoded).

When i pass to Kohana:
http://example.com/welcome/index/one%20two
then $this->request->url(TRUE) returns decoded URL:
http://example.com/welcome/index/one two (with space between 'one' and 'two').

I think only Route parameters (directory, controller and action too) should be rawurldecoded, not entire URL.

Its important when I reuse current request URL, for example:

$this->request->redirect($this->request->uri());
<a href="<?php echo Request::current()->url(); ?>">Link</a>

It should be done for initial, internal and external request, and it is related to #630.

Summarizing:

  1. Request URL and URI should NOT be rawurldecoded for all kind of requests (initial, internal and external request).
  2. Route parameters should be always rawurldecoded for all kind of requests (initial, internal and external request). See rawurldecode request params #630.
@neo22s neo22s added this to the 4.0.0 milestone Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants