Commit 339ce8bb authored by Leigh Stoller's avatar Leigh Stoller

When user rejected cause IP is frozen, tell the user so they can

tell us.
parent f2518d8d
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2017, 2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -261,6 +261,22 @@ else {
PAGEFOOTER($view);
die("");
}
else if ($dologin_status == DOLOGIN_STATUS_IPFREEZE) {
# Short delay.
sleep(1);
$IP = $_SERVER['REMOTE_ADDR'];
PAGEHEADER("Login", $view);
echo "<h4>
There have been too many failures from your IP address, we
have blocked $IP from further attempts.
You must contact $TBMAILADDR to have this IP unblocked.
<br> <br>
Please do not attempt to login again; it will not work!
</h4>\n";
PAGEFOOTER($view);
die("");
}
else if ($dologin_status == DOLOGIN_STATUS_INACTIVE) {
# Short delay.
sleep(1);
......
......@@ -905,6 +905,8 @@ function DOLOGIN($token, $password, $adminmode = 0, $nopassword = 0) {
$ipfrozen = $iprow['frozen'];
if ($ipfrozen) {
#TBMAIL('stoller', "Login Debug", "Disabled IP $token $IP");
DBQueryFatal("update login_failures set ".
" failcount=failcount+1, ".
" failstamp='$now' ".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment