Skip to content

Commit

Permalink
Fix #1611: Duplicate path links
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown authored and Unknown committed Apr 10, 2019
1 parent d01bd71 commit a8d4c38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 0 additions & 3 deletions modules/page/inc/page.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@
}
// Building the canonical URL
$out['canonical_uri'] = cot_url('page', $pageurl_params);
if ($out['uri'] != $out['canonical_uri']) {
cot_die_message(404, true);
}

$_SESSION['cat'] = $c;

Expand Down
3 changes: 0 additions & 3 deletions modules/page/inc/page.main.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@
$pageurl_params['pg'] = $pg;
}
$out['canonical_uri'] = cot_url('page', $pageurl_params);
if ($out['uri'] != $out['canonical_uri']) {
cot_die_message(404, true);
}

$mskin = cot_tplfile(array('page', $cat['tpl']));

Expand Down
8 changes: 8 additions & 0 deletions plugins/urleditor/inc/urleditor.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ function cot_apply_rwr()
{
// Is a category
$_GET['c'] = $path[$last];
if ($rwr !== cot_url($ext, array('c' => $_GET['c']))) {
cot_die_message(404, true);
}
}
else
{
Expand All @@ -159,6 +162,11 @@ function cot_apply_rwr()
$_GET['c'] = $path[$last];
$_GET['al'] = $path[$last];
}
if (!empty($_GET['id'] || $_GET['al']) && $_GET['c']) {
if ($rwr !== cot_url($ext, array('c' => $_GET['c'], !empty($_GET['al']) ? 'al' : 'id' => $path[$last]))) {
cot_die_message(404, true);
}
}
}
}
}
Expand Down

0 comments on commit a8d4c38

Please sign in to comment.