HADOOP-13580. If user is unauthorized, log "unauthorized" instead of "Invalid signed text:". Contributed by Wei-Chiu Chuang.
(cherry picked from commitf6f3a447bf
) (cherry picked from commit031d5f6c5b
)
This commit is contained in:
parent
ab57c869e2
commit
c7b79e8d91
|
@ -438,6 +438,9 @@ public class AuthenticationFilter implements Filter {
|
|||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals(AuthenticatedURL.AUTH_COOKIE)) {
|
||||
tokenStr = cookie.getValue();
|
||||
if (tokenStr.isEmpty()) {
|
||||
throw new AuthenticationException("Unauthorized access");
|
||||
}
|
||||
try {
|
||||
tokenStr = signer.verifyAndExtract(tokenStr);
|
||||
} catch (SignerException ex) {
|
||||
|
|
Loading…
Reference in New Issue