Skip to content

Commit

Permalink
MDL-47321 iplookup: Prevent guest users from using iplookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart authored and Sam Hemelryk committed Nov 3, 2014
1 parent c4a6c65 commit eb46bf2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iplookup/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
require('../config.php');
require_once('lib.php');

require_login();
require_login(0, false);
if (isguestuser()) {
// Guest users cannot perform lookups.
throw new require_login_exception('Guests are not allowed here.');
}

$ip = optional_param('ip', getremoteaddr(), PARAM_HOST);
$user = optional_param('user', 0, PARAM_INT);
Expand Down

0 comments on commit eb46bf2

Please sign in to comment.