Skip to content

Commit

Permalink
Fixed #718: Generating the current route without additional arguments…
Browse files Browse the repository at this point in the history
… results in unescaped single quotes and square brackets, potentially incorrectly replaced argument separator
  • Loading branch information
dzuelke committed Feb 27, 2008
1 parent 360dbc9 commit 3edb69d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CHG: dist.htaccess in code templates should have RewriteEngine On (#678) (David)
CHG: Bumped and fixed copyright years (#664) (David)
CHG: Update timezone database to 2007k (#660) (David)

FIX: Generating the current route without additional arguments results in unescaped single quotes and square brackets, potentially incorrectly replaced argument separator (#718) (David)
FIX: Generating the current route with additional or changed arguments allows code injections (#717) (David)
FIX: Unsetting a user parameter that in a routing callback's onGenerate() was passed to gen() produces strange behavior (#714) (David)
FIX: Setting a user parameter that was undefined in a routing callback's onGenerate() has no effect if a default is defined (#713) (David)
Expand Down
2 changes: 1 addition & 1 deletion src/routing/AgaviWebRouting.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function gen($route, array $params = array(), $options = array())

if($route === null && empty($params)) {
$retval = $req->getRequestUri();
$retval = str_replace('&', $aso, $retval);
$retval = str_replace(array('[', ']', '\'', ini_get('arg_separator.input')), array('%5B', '%5D', '%27', $aso), $retval);
} else {
if(defined('SID') && SID !== '' && $options['use_trans_sid'] === true) {
$params = array_merge($params, array(session_name() => session_id()));
Expand Down

0 comments on commit 3edb69d

Please sign in to comment.