From 52bcbc6707af55566e167059cf3d5d24beb3f5da Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Tue, 31 Oct 2023 08:19:46 -0400 Subject: [PATCH] I tested manually uploading a series of certificates to test the list pages functionality when it comes to sorting and other visual aspects of the data table. I encountered a certificate that caused the ACA to throw a 500 error. This was due to an IllegalStateException while parsing a certificate that contained an 'unexpected object'. Since this is a bouncy castle error, it is hard to parse out what the object actually is that is causing the error to be thrown. For now, the parsing method in the certificate page controller is being updated to catch the exception, at least, so that the ACA doesn't crash. The platform in question is a Dell Power Edge R640 base SCV. --- .../portal/page/controllers/CertificatePageController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java index 77968193..6098c431 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/CertificatePageController.java @@ -842,6 +842,12 @@ public class CertificatePageController extends PageController { log.error(failMessage, iaEx); messages.addError(failMessage + iaEx.getMessage()); return null; + } catch (IllegalStateException isEx) { + final String failMessage = String.format( + "Unexpected object while parsing %s ", fileName); + log.error(failMessage, isEx); + messages.addError(failMessage + isEx.getMessage()); + return null; } }