Skip to content

Commit

Permalink
SAK-50557 LTI: Exceptions thrown for some tools placed on Home site
Browse files Browse the repository at this point in the history
  • Loading branch information
hornersa committed Oct 1, 2024
1 parent bd75983 commit 714644f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ private void redirectOIDC(HttpServletRequest req, HttpServletResponse res,

byte[] bytesEncoded = Base64.encodeBase64(login_hint.getBytes());
String encoded_login_hint = new String(bytesEncoded);

log.debug("login_hint={}", login_hint);
log.debug("encoded_login_hint={}", encoded_login_hint);

try {
URIBuilder redirect = new URIBuilder(oidc_endpoint.trim());
redirect.addParameter("iss", SakaiBLTIUtil.getOurServerUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,16 @@ private void handleOIDCAuthorization(HttpServletRequest request, HttpServletResp
redirect_uri = StringUtils.trimToNull(redirect_uri);

String encoded_login_hint = (String) request.getParameter("login_hint");
encoded_login_hint = encoded_login_hint.replace(' ', '+'); // when posted, plus signs may become supplanted by spaces
byte[] valueDecoded = Base64.decodeBase64(encoded_login_hint);
String login_hint = new String(valueDecoded);
if (StringUtils.isEmpty(login_hint)) {
state = null;
}

log.debug("encoded_login_hint={}", encoded_login_hint);
log.debug("login_hint={}", login_hint);

String nonce = (String) request.getParameter("nonce");
nonce = StringUtils.trimToNull(nonce);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,7 @@
color: var(--sakai-text-color-1);
background-color: var(--sakai-background-color-2);
}

i.fa {
width: 14px;
}

0 comments on commit 714644f

Please sign in to comment.