Skip to content

Commit

Permalink
fix: account absent start url in native flows #10729
Browse files Browse the repository at this point in the history
Signed-off-by: jgomer2001 <[email protected]>
  • Loading branch information
jgomer2001 committed Jan 24, 2025
1 parent 4ef6c9a commit 5d25c50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion agama/misc/json_finished.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
"success": ${success?c},
<#if success>
"post_finish_url": "${webCtx.contextPath}/${data.post_finish_url}"
"post_finish_url":
<#if (data.post_finish_url)??>"${webCtx.contextPath}/${data.post_finish_url}"<#else>null</#if>
<#else>
"error": "${jt.escStr(error!"")}"
</#if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)
if (result == null) {
sendRedirect(response, request.getContextPath(), fstatus, true);
} else {
sendFinishPage(response, result, fstatus.isNativeClient() ? null : fstatus.getStartUrl());
sendFinishPage(response, result, fstatus.getStartUrl());
}
} catch (FlowCrashException e) {
logger.error(e.getMessage(), e);
Expand Down Expand Up @@ -159,7 +159,7 @@ private void continueFlow(HttpServletResponse response, FlowStatus fstatus, bool
sendRedirect(response, request.getContextPath(), fstatus,
request.getMethod().equals(HttpMethod.GET));
} else {
sendFinishPage(response, result, fstatus.isNativeClient() ? null : fstatus.getStartUrl());
sendFinishPage(response, result, fstatus.getStartUrl());
}

} catch (FlowTimeoutException te) {
Expand Down

0 comments on commit 5d25c50

Please sign in to comment.