Hey,
A small bug-like thing I found is that sometimes we get the message, while trying to login
into the lucee admin page, that the login is disabled until a certain point in time.
How can we disable this? Tried to remove the code from the Lucee core, but still get the message.
Kind regards,
DrunkenMoose
Can you post a link to the problem code (and the error message) on github?
Hello, it’s not my code, it’s the actually lucee instance.
I just get the validation error “Login disabled until …”
</cfif>
<cfif structKeyExists(form, "login_password" & request.adminType)>
<cfadmin action="getLoginSettings"
type="#request.adminType#"
returnVariable="loginSettings">
<cfset loginPause = loginSettings.delay>
<cfif loginPause && structKeyExists(application, "lastTryToLogin") && isDate(application.lastTryToLogin) && DateDiff("s", application.lastTryToLogin, now()) LT loginPause>
<cfset login_error = "Login disabled until #lsDateFormat(dateAdd("s", loginPause, application.lastTryToLogin))# #lsTimeFormat(dateAdd("s", loginPause, application.lastTryToLogin),'hh:mm:ss')#">
<cfelse>
<cfset application.lastTryToLogin = now()>
<cfparam name="form.captcha" default="">
<cfif loginSettings.captcha && structKeyExists(session, "cap") && compare(form.captcha,session.cap) != 0>
<cfset login_error = "Invalid security code (captcha) definition">
<cfelse>
<cfadmin action="hashPassword"
type="#request.adminType#"
pw="#form["login_password"&ad]#"
<th scope="row">#stText.Login.useCaptcha#</th>
<td>
<cfinputClassic type="checkbox" class="checkbox" name="captcha" checked="#settings.captcha#" value="true">
<div class="comment">#stText.Login.useCaptchaDesc#</div>
</td>
</tr>
<tr>
<th scope="row">#stText.Login.delay#</th>
<td>
<select name="delay"><cfset hasDelay=false>
<cfloop list="0,1,5,10,30,60" index="i"><option <cfif settings.delay EQ i><cfset hasDelay=true>selected="selected"</cfif>>#i#</option></cfloop>
<cfif not hasDelay><option selected="selected">#settings.delay#</option></cfif>
</select> #stText.Login.seconds#
<div class="comment">#stText.Login.delayDesc#</div>
</td>
</tr>
<tr>
<th scope="row">#stText.Login.rememberMeEnable#</th>
<td>
<cfinputClassic type="checkbox" class="checkbox" name="remembermeEnable" checked="#settings.rememberme#" value="true">
<div class="comment">#stText.Login.rememberMeEnableDesc#</div>
1 Like