Merge branch 'MDL-44642-master-fixes' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao 2014-12-16 11:43:21 +08:00
commit d0f3b7e685
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,10 @@ require_once(dirname(__DIR__) . '/config.php');
// Require the session key - want to make sure that this isn't called
// maliciously to keep a session alive longer than intended.
require_sesskey();
if (!confirm_sesskey()) {
header('HTTP/1.1 403 Forbidden');
print_error('invalidsesskey');
}
// Update the session.
\core\session\manager::touch_session(session_id());

View File

@ -82,7 +82,6 @@ function confirm_sesskey($sesskey=NULL) {
*/
function require_sesskey() {
if (!confirm_sesskey()) {
header('HTTP/1.1 403 Forbidden');
print_error('invalidsesskey');
}
}