Permalink
Browse files

When secure forms is on, allow forms to come from the home page

Primarily this is for the login block but could work for other
blocks too.
  • Loading branch information...
moodler
moodler committed Sep 1, 2004
1 parent c788caf commit 42e249983d77ec6a081273f71048c21f3b23286d
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/weblib.php
View
@@ -157,7 +157,10 @@ function match_referer($goodreferer = "") {
if (empty($goodreferer)) {
$goodreferer = qualified_me();
}
- return $goodreferer == get_referer();
+
+ $referer = get_referer();
+
+ return (($referer == $goodreferer) or ($referer == "$CFG->wwwroot/"));
}
function data_submitted($url="") {

0 comments on commit 42e2499

Please sign in to comment.