[java-shib-shared] branch main updated: IDP-2017 - Review all classes for use of javax.servlet attributes
Scott Cantor
cantor.2 at osu.edu
Mon Oct 3 15:59:41 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-shared.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=20080a4cc32306f32abdec2f7f91b593bc865f58
The following commit(s) were added to refs/heads/main by this push:
new 20080a4c IDP-2017 - Review all classes for use of javax.servlet attributes
20080a4c is described below
commit 20080a4cc32306f32abdec2f7f91b593bc865f58
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Oct 3 11:59:38 2022 -0400
IDP-2017 - Review all classes for use of javax.servlet attributes
https://shibboleth.atlassian.net/browse/IDP-2017
Fix ErrorRaisingController.
---
.../shared/spring/error/ErrorRaisingController.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/shib-spring/src/main/java/net/shibboleth/shared/spring/error/ErrorRaisingController.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/error/ErrorRaisingController.java
index 98554f73..2742aeb6 100644
--- a/shib-spring/src/main/java/net/shibboleth/shared/spring/error/ErrorRaisingController.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/error/ErrorRaisingController.java
@@ -46,9 +46,16 @@ public class ErrorRaisingController {
// Checkstyle: IllegalThrows OFF
public void raiseError(@Nonnull final HttpServletRequest httpRequest) throws Throwable {
- final Object uri = httpRequest.getAttribute("javax.servlet.error.request_uri");
+ Object uri = httpRequest.getAttribute("jakarta.servlet.error.request_uri");
+ if (uri == null) {
+ uri = httpRequest.getAttribute("javax.servlet.error.request_uri");
+ }
- final Object exception = httpRequest.getAttribute("javax.servlet.error.exception");
+ Object exception = httpRequest.getAttribute("jakarta.servlet.error.exception");
+ if (exception == null) {
+ exception = httpRequest.getAttribute("javax.servlet.error.exception");
+ }
+
if (exception == null || !(exception instanceof Exception)) {
log.error("No exception found in request attribute, raising a generic error");
throw new IllegalArgumentException("No exception found in request attribute");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list