@@ -72,15 +72,15 @@ public class LoginServlet extends HttpServlet {
72
72
@ Override
73
73
protected void doPost (HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException {
74
74
HttpSession httpSession = request .getSession ();
75
- Integer loginAttemptsByUser ;
75
+ Integer loginAttemptsByUserName ;
76
76
String ipAddress = request .getRemoteAddr ();
77
77
Integer loginAttempts = loginAttemptsByIP .get (ipAddress );
78
78
if (loginAttempts == null ) {
79
79
loginAttempts = 1 ;
80
80
}
81
81
82
82
loginAttempts ++;
83
- loginAttemptsByUser = loginAttempts - 1 ;
83
+ loginAttemptsByUserName = loginAttempts - 1 ;
84
84
boolean lockedOut = false ;
85
85
// look up the allowed # of attempts per IP
86
86
Integer allowedLockoutAttempts = 100 ;
@@ -186,12 +186,12 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
186
186
String maximumAttempts = Context .getAdministrationService ().getGlobalProperty (GP_MAXIMUM_ALLOWED_LOGINS , "7" );
187
187
Integer maximumAlowedAttempts = Integer .valueOf (maximumAttempts );
188
188
189
- if (loginAttemptsByUser <= maximumAlowedAttempts ) {
189
+ if (loginAttemptsByUserName <= maximumAlowedAttempts ) {
190
190
httpSession .setAttribute (WebConstants .OPENMRS_ERROR_ATTR , "auth.password.invalid" );
191
191
192
192
}
193
193
194
- if (loginAttemptsByUser > maximumAlowedAttempts ) {
194
+ if (loginAttemptsByUserName > maximumAlowedAttempts ) {
195
195
httpSession .setAttribute (WebConstants .OPENMRS_ERROR_ATTR , "legacyui.lockedOutMessage" );
196
196
}
197
197
}
0 commit comments