From daff0104e37e181ce2e640844171cf28507cfe5b Mon Sep 17 00:00:00 2001 From: "Horner, Sean A" Date: Tue, 1 Oct 2024 15:04:53 -0700 Subject: [PATCH] SAK-50557 LTI: Exceptions thrown for some tools placed on Home site --- .../basiclti/impl/BasicLTISecurityServiceImpl.java | 3 +++ .../src/java/org/sakaiproject/lti13/OIDCServlet.java | 3 +++ .../skins/default/src/sass/modules/tool/portal/_portal.scss | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java b/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java index 16b7f8c79bc8..5abec3c65740 100644 --- a/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java +++ b/basiclti/basiclti-impl/src/java/org/sakaiproject/basiclti/impl/BasicLTISecurityServiceImpl.java @@ -318,6 +318,9 @@ 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=[{}], encoded_login_hint=[{}]", login_hint, encoded_login_hint); + try { URIBuilder redirect = new URIBuilder(oidc_endpoint.trim()); redirect.addParameter("iss", SakaiBLTIUtil.getOurServerUrl()); diff --git a/basiclti/basiclti-oidc/src/java/org/sakaiproject/lti13/OIDCServlet.java b/basiclti/basiclti-oidc/src/java/org/sakaiproject/lti13/OIDCServlet.java index 863b7fd2ccb7..fa4fe41f4cbb 100644 --- a/basiclti/basiclti-oidc/src/java/org/sakaiproject/lti13/OIDCServlet.java +++ b/basiclti/basiclti-oidc/src/java/org/sakaiproject/lti13/OIDCServlet.java @@ -126,12 +126,15 @@ 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("login_hint=[{}], encoded_login_hint=[{}]", login_hint, encoded_login_hint); + String nonce = (String) request.getParameter("nonce"); nonce = StringUtils.trimToNull(nonce); diff --git a/library/src/skins/default/src/sass/modules/tool/portal/_portal.scss b/library/src/skins/default/src/sass/modules/tool/portal/_portal.scss index 5896ad5efde2..5d8549674532 100644 --- a/library/src/skins/default/src/sass/modules/tool/portal/_portal.scss +++ b/library/src/skins/default/src/sass/modules/tool/portal/_portal.scss @@ -577,3 +577,7 @@ color: var(--sakai-text-color-1); background-color: var(--sakai-background-color-2); } + +i.fa { + width: 14px; +}