@@ -72,15 +72,15 @@ public class LoginServlet extends HttpServlet {
7272 @ Override
7373 protected void doPost (HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException {
7474 HttpSession httpSession = request .getSession ();
75- Integer loginAttemptsByUser ;
75+ Integer loginAttemptsByUserName ;
7676 String ipAddress = request .getRemoteAddr ();
7777 Integer loginAttempts = loginAttemptsByIP .get (ipAddress );
7878 if (loginAttempts == null ) {
7979 loginAttempts = 1 ;
8080 }
8181
8282 loginAttempts ++;
83- loginAttemptsByUser = loginAttempts - 1 ;
83+ loginAttemptsByUserName = loginAttempts - 1 ;
8484 boolean lockedOut = false ;
8585 // look up the allowed # of attempts per IP
8686 Integer allowedLockoutAttempts = 100 ;
@@ -186,12 +186,12 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
186186 String maximumAttempts = Context .getAdministrationService ().getGlobalProperty (GP_MAXIMUM_ALLOWED_LOGINS , "7" );
187187 Integer maximumAlowedAttempts = Integer .valueOf (maximumAttempts );
188188
189- if (loginAttemptsByUser <= maximumAlowedAttempts ) {
189+ if (loginAttemptsByUserName <= maximumAlowedAttempts ) {
190190 httpSession .setAttribute (WebConstants .OPENMRS_ERROR_ATTR , "auth.password.invalid" );
191191
192192 }
193193
194- if (loginAttemptsByUser > maximumAlowedAttempts ) {
194+ if (loginAttemptsByUserName > maximumAlowedAttempts ) {
195195 httpSession .setAttribute (WebConstants .OPENMRS_ERROR_ATTR , "legacyui.lockedOutMessage" );
196196 }
197197 }
0 commit comments