summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlalber <lukas.alber@iaik.tugraz.at>2021-03-31 15:38:44 +0200
committerlalber <lukas.alber@iaik.tugraz.at>2021-03-31 15:38:44 +0200
commit997119b8c25bb256c1bf937d427febf975d570ce (patch)
tree1e8952f8fdc50e57a08ae2c55b0e5bc88f24da70
parentf76af302b54a0ddc0668ae93a2d32a07b60e6495 (diff)
downloadEAAF-Components-997119b8c25bb256c1bf937d427febf975d570ce.tar.gz
EAAF-Components-997119b8c25bb256c1bf937d427febf975d570ce.tar.bz2
EAAF-Components-997119b8c25bb256c1bf937d427febf975d570ce.zip
inf recursion fix
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
index 09977f52..c666eaa9 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
@@ -234,8 +234,8 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
try {
ErrorTicketService.HandleData errorData = errorTicketService.createHandleData(throwable, req);
- if (errorData.getActionType().equals(ErrorTicketService.ActionType.TICKET_REDIRECT)
- || errorData.getActionType().equals(ErrorTicketService.ActionType.NOTICKET_REDIRECT)) {
+ if (errorData.getActionType().equals(ErrorTicketService.ActionType.TICKET_REDIRECT) || errorData.getActionType()
+ .equals(ErrorTicketService.ActionType.NOTICKET_REDIRECT)) {
// Put pending request
ExceptionContainer exceptionContainer = new ExceptionContainer(protocolRequest, throwable);
@@ -340,13 +340,15 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
} catch (EaafException e) {
// retry
- handleErrorNoRedirect(e, req, resp, writeExceptionToStatisticLog, true);
-
+ if (recall) {
+ handleErrorNoRedirect(e, req, resp, writeExceptionToStatisticLog, true);
+ }
} catch (IOException e) {
// retry
- handleErrorNoRedirect(new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC, null, e), req, resp,
- writeExceptionToStatisticLog, true);
-
+ if (recall) {
+ handleErrorNoRedirect(new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC, null, e), req, resp,
+ writeExceptionToStatisticLog, true);
+ }
}
}
@@ -603,9 +605,8 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
private String generateErrorRedirectUrl(final HttpServletRequest req, String errorKey) {
String redirectUrl = null;
redirectUrl = ServletUtils.getBaseUrl(req);
- redirectUrl +=
- "/" + ProtocolFinalizationController.ENDPOINT_ERRORHANDLING + "?" + EaafConstants.PARAM_HTTP_ERROR_CODE + "="
- + errorKey;
+ redirectUrl += "/" + ProtocolFinalizationController.ENDPOINT_ERRORHANDLING + "?"
+ + EaafConstants.PARAM_HTTP_ERROR_CODE + "=" + errorKey;
return redirectUrl;
}