diff --git a/BappManifest.bmf b/BappManifest.bmf index 5f75984..46355a6 100644 --- a/BappManifest.bmf +++ b/BappManifest.bmf @@ -2,12 +2,12 @@ Uuid: c61cfa893bb14db4b01775554f7b802e ExtensionType: 1 Name: SAML Raider RepoName: saml-raider -ScreenVersion: 2.0.1 -SerialVersion: 15 +ScreenVersion: 2.0.2 +SerialVersion: 16 MinPlatformVersion: 0 ProOnly: False Author: Roland Bischofberger / Emanuel Duss / Tobias Hort-Giess ShortDescription: Provides a SAML message editor and a certificate management tool to help with testing SAML infrastructures. -EntryPoint: build/libs/saml-raider-2.0.1.jar +EntryPoint: build/libs/saml-raider-2.0.2.jar BuildCommand: ./gradlew jar SupportedProducts: Pro, Community diff --git a/README.md b/README.md index e9917de..e4f5694 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Don't forget to rate our extension with as many stars you like :smile:. ### Manual Installation First, download the latest SAML Raider version: -[saml-raider-2.0.1.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.1/saml-raider-2.0.1.jar). +[saml-raider-2.0.2.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.2/saml-raider-2.0.2.jar). Then, start Burp Suite and click in the `Extensions` tab on `Add`. Choose the SAML Raider JAR file to install it and you are ready to go. diff --git a/build.gradle b/build.gradle index 006deea..f5f5223 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id "java-library" } -version = "2.0.1" +version = "2.0.2" repositories { mavenCentral() diff --git a/src/main/java/gui/CertificateTab.java b/src/main/java/gui/CertificateTab.java index f49b742..595dc89 100644 --- a/src/main/java/gui/CertificateTab.java +++ b/src/main/java/gui/CertificateTab.java @@ -1,18 +1,15 @@ package gui; -import burp.BurpExtender; -import javax.swing.tree.TreeSelectionModel; -import model.BurpCertificateBuilder; import application.CertificateTabController; import model.BurpCertificate; +import model.BurpCertificateBuilder; import model.ObjectIdentifier; import net.miginfocom.swing.MigLayout; import javax.swing.*; -import javax.swing.event.TreeSelectionEvent; -import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreeSelectionModel; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -150,16 +147,34 @@ public void actionPerformed(ActionEvent e) { certificateTreeModel = new DefaultTreeModel(new DefaultMutableTreeNode("root")); certificateTree = new JTree(certificateTreeModel); certificateTree.setRootVisible(false); + certificateTree.setShowsRootHandles(true); + certificateTree.setCellRenderer((tree, value, selected, expanded, leaf, row, hasFocus) -> { + var label = new JLabel(); + label.setText(value.toString()); + if (leaf) { + label.setIcon(UIManager.getIcon("Tree.leafIcon")); + } else if (expanded) { + label.setIcon(UIManager.getIcon("Tree.openIcon")); + } else { + label.setIcon(UIManager.getIcon("Tree.closedIcon")); + } + if (selected) { + label.setForeground(UIManager.getColor("Tree.selectionForeground")); + label.setBackground(UIManager.getColor("Tree.selectionBackground")); + } else { + label.setForeground(UIManager.getColor("Tree.textForeground")); + label.setBackground(UIManager.getColor("Tree.textBackground")); + } + return label; + }); certificateTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); - certificateTree.addTreeSelectionListener(new TreeSelectionListener() { - public void valueChanged(TreeSelectionEvent e) { - DefaultMutableTreeNode node = (DefaultMutableTreeNode) certificateTree.getLastSelectedPathComponent(); - if (node == null || node.getUserObject() instanceof String) { - return; - } - BurpCertificate burpCertificate = (BurpCertificate) node.getUserObject(); - certificateTabController.setCertificateDetails(burpCertificate); + certificateTree.addTreeSelectionListener(event -> { + DefaultMutableTreeNode node = (DefaultMutableTreeNode) certificateTree.getLastSelectedPathComponent(); + if (node == null || node.getUserObject() instanceof String) { + return; } + BurpCertificate burpCertificate = (BurpCertificate) node.getUserObject(); + certificateTabController.setCertificateDetails(burpCertificate); }); txtStatus = new JTextPane(); @@ -500,19 +515,6 @@ public void actionPerformed(ActionEvent e) { this.setLayout(new MigLayout()); this.add(topPanel, "wrap"); this.add(scrollableBottomPanel, "width 100%"); - - // In the default look and feel the JTree component does not render correctly. - // Icons are missing and tree notes are not correctly indented. - // This workaround should changes the look and feel of the JTree only. - // https://forum.portswigger.net/thread/jtree-not-rendering-correctly-with-burpsuite-s-look-and-feel-2a164857?CategoryId=bug-reports - try { - var lookAndFeel = UIManager.getLookAndFeel(); - UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); - SwingUtilities.updateComponentTreeUI(certificateTree); - UIManager.setLookAndFeel(lookAndFeel); - } catch (Exception exc) { - BurpExtender.api.logging().logToError(exc); - } } public void setCertificateTabController(CertificateTabController certificateTabController) { @@ -763,7 +765,6 @@ public boolean isAutoSubjectKeyIdentifier() { public void setCertificateRootNode(DefaultMutableTreeNode rootNode) { this.certificateTreeModel.setRoot(rootNode); - certificateTree.setModel(certificateTreeModel); } public void setAllExtensions(List allExtensions) {