From 868ecf41cb2918db3caf9d00322b1ad86bc31493 Mon Sep 17 00:00:00 2001 From: Jake Karnes Date: Thu, 14 Apr 2022 08:18:53 -0700 Subject: [PATCH] Add word wrapping for error messages displayed in 'Status' Area --- .../awssigner/controller/AWSSignerController.java | 6 ++++-- .../java/com/netspi/awssigner/view/BurpTabPanel.form | 10 +++++----- .../java/com/netspi/awssigner/view/BurpTabPanel.java | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/netspi/awssigner/controller/AWSSignerController.java b/src/main/java/com/netspi/awssigner/controller/AWSSignerController.java index 0127a20..2dc51f4 100644 --- a/src/main/java/com/netspi/awssigner/controller/AWSSignerController.java +++ b/src/main/java/com/netspi/awssigner/controller/AWSSignerController.java @@ -310,7 +310,8 @@ private void initListeners() { //Quick check to see if we need to report the cause at one level deeper Throwable cause = ex.getCause() == null ? ex : ex.getCause(); logError("Cause: " + cause.getMessage()); - view.profileStatusTextLabel.setText("Error testing profile: " + cause.getMessage()); + view.profileStatusTextLabel.putClientProperty("html.disable", null); + view.profileStatusTextLabel.setText("Error testing profile: " + cause.getMessage() + ""); } }).start(); @@ -373,7 +374,8 @@ private void initListeners() { logError("Unable to parse session policy into JSON object and pretty print. Current value: " + sessionPolicy); //Quick check to see if we need to report the cause at one level deeper Throwable cause = ex.getCause() == null ? ex : ex.getCause(); - view.profileStatusTextLabel.setText("Session policy error: " + cause.getMessage()); + view.profileStatusTextLabel.putClientProperty("html.disable", null); + view.profileStatusTextLabel.setText("Session policy error: " + cause.getMessage() + ""); } } else { logDebug("There's no current session policy. Nothing to set."); diff --git a/src/main/java/com/netspi/awssigner/view/BurpTabPanel.form b/src/main/java/com/netspi/awssigner/view/BurpTabPanel.form index 60971cb..d23a355 100644 --- a/src/main/java/com/netspi/awssigner/view/BurpTabPanel.form +++ b/src/main/java/com/netspi/awssigner/view/BurpTabPanel.form @@ -421,11 +421,11 @@ - + - + @@ -468,9 +468,9 @@ - - - + + + diff --git a/src/main/java/com/netspi/awssigner/view/BurpTabPanel.java b/src/main/java/com/netspi/awssigner/view/BurpTabPanel.java index 0a73fa9..97d7425 100644 --- a/src/main/java/com/netspi/awssigner/view/BurpTabPanel.java +++ b/src/main/java/com/netspi/awssigner/view/BurpTabPanel.java @@ -643,11 +643,11 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(profileConfigurationPanelLayout.createSequentialGroup() .addGap(10, 10, 10) - .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(profileConfigurationPanelLayout.createSequentialGroup() .addComponent(profileStatusLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(profileStatusTextLabel)) + .addComponent(profileStatusTextLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 637, Short.MAX_VALUE)) .addGroup(profileConfigurationPanelLayout.createSequentialGroup() .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(profileServiceLabel) @@ -678,7 +678,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { .addComponent(profileConfigurationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(profileNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(profileConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(profileStatusLabel) .addComponent(profileStatusTextLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)