Zend Framework

Zend_Controller_Router_Route_Chain does not urldecode the path info

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.0
  • Fix Version/s: 1.11.1
  • Component/s: Zend_Controller
  • Labels:
    None

Description

In Zend/Controller/Router/Route/Chain.php on line 75, in the match() method:

$path = trim($request->getPathInfo(), '/');

Then the match method proceeds to call match on all the routes in the chain, with the argument partial set to true.

When partial is set to true, the sub-routes do not urldecode the path info. Since it is never done in the Chain route itself, it is not done at all.

Issue Links

Activity

Hide
Ziad added a comment -

I have fixed the issue by modifying Zend/Controller/Router/Route/Chain.php on line 75 from:

$path = trim($request->getPathInfo(), '/');

to:

$path = trim( urldecode( $request->getPathInfo() ), '/');

After modifying this line and testing my application, I do not seem to have introduced any new bugs.

Show
Ziad added a comment - I have fixed the issue by modifying Zend/Controller/Router/Route/Chain.php on line 75 from: $path = trim($request->getPathInfo(), '/'); to: $path = trim( urldecode( $request->getPathInfo() ), '/'); After modifying this line and testing my application, I do not seem to have introduced any new bugs.
Hide
Matthew Weier O'Phinney added a comment -

Assigning to Ben.

Show
Matthew Weier O'Phinney added a comment - Assigning to Ben.
Hide
Khaldeev Ivan added a comment -

Why this bug not fixed? It's critical for cyrillic charsets

Show
Khaldeev Ivan added a comment - Why this bug not fixed? It's critical for cyrillic charsets
Hide
Ramon Henrique Ornelas added a comment -

Fixed with the issue ZF-3527.

Show
Ramon Henrique Ornelas added a comment - Fixed with the issue ZF-3527.

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: