Skip to content

Commit

Permalink
fixed secure forms handling when POST url contained GET parameters (c…
Browse files Browse the repository at this point in the history
…ookieless mode and some other forms); merged from MOODLE_16_STABLE
  • Loading branch information
skodak committed May 14, 2006
1 parent 70cedbf commit 70ed990
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/weblib.php
Expand Up @@ -284,6 +284,11 @@ function match_referer($goodreferer = '') {

if (empty($goodreferer)) {
$goodreferer = qualified_me();
// try to remove everything after ? because POST url may contain GET parameters (SID rewrite, etc.)
$pos = strpos($goodreferer, '?');
if ($pos !== FALSE) {
$goodreferer = substr($goodreferer, 0, $pos);
}
}

$referer = get_referer();
Expand Down

0 comments on commit 70ed990

Please sign in to comment.