Home > coldfusion > Prevent spontaneously attempted login attack

Prevent spontaneously attempted login attack

Sometimes, most of our websites have been attacked by spontaneously attempted login attack by bots. That’s why we gotta prevent anyone cannot do like that in our web application. Fortunately, it’s very simple to do in ColdFusion. Here is coding…

<cfif session.FailedLogin GT 3>

<cfabort message=”Sorry.! Please contact website administrator to get your password.”>

</cfif>
<cfif loginsuccessfully ….>

Write your code here

<cfelse>

<cfparam name=”session.FailedLogin” default=”0″>
<cfset session.FailedLogin = session.FailedLogin+1>
<cfabort message=”Invalid Username and password”>

</cfif>

Categories: coldfusion Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.