Skip to content
Snippets Groups Projects
Commit 406512fa authored by Prasad's avatar Prasad
Browse files

Normalize login error message

parent 51222902
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,9 @@
if($user->status != 'Inactive'){
return $user;
}
throw new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED,'Given user is inactive');
// Finer exception message could be handy to enumeration attacks - so normalize it.
//throw new WebServiceException(WebServiceErrorCode::$AUTHREQUIRED,'Given user is inactive');
throw new WebServiceException(WebServiceErrorCode::$INVALIDUSERPWD,"Invalid username or password");
}
function vtws_getActiveToken($userId){
......@@ -60,4 +62,4 @@
return null;
}
?>
\ No newline at end of file
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment