@@ -21,26 +21,26 @@ public class SamlPanelAction extends JPanel {
21
21
22
22
private SamlTabController controller ;
23
23
24
- private JButton btnMessageReset ;
25
- private JCheckBox chkRawMode ;
24
+ private final JButton btnMessageReset = new JButton ( "Reset Message" ) ;
25
+ private final JCheckBox chkRawMode = new JCheckBox ( "Raw Mode (don't parse XML before sending)" ) ;
26
26
27
- private JButton btnXSWHelp ;
28
- private JComboBox <String > cmbboxXSW ;
29
- private JButton btnXSWPreview ;
30
- private JButton btnMatchAndReplace ;
31
- private JButton btnXSWApply ;
27
+ private final JButton btnXSWHelp = new JButton ( "Help" ) ;
28
+ private final JComboBox <String > cmbboxXSW = new JComboBox <>() ;
29
+ private final JButton btnXSWPreview = new JButton ( "Preview in Browser..." ) ;
30
+ private final JButton btnMatchAndReplace = new JButton ( "Match and Replace" ) ;
31
+ private final JButton btnXSWApply = new JButton ( "Apply XSW" ) ;
32
32
33
- private JButton btnTestXXE ;
34
- private JButton btnTestXSLT ;
33
+ private final JButton btnTestXXE = new JButton ( "Test XXE" ) ;
34
+ private final JButton btnTestXSLT = new JButton ( "Test XSLT" ) ;
35
35
36
- private JButton btnSignatureHelp ;
37
- private JComboBox <BurpCertificate > cmbboxCertificate ;
38
- private JButton btnSignatureRemove ;
39
- private JButton btnResignAssertion ;
40
- private JButton btnSendCertificate ;
41
- private JButton btnResignMessage ;
36
+ private final JButton btnSignatureHelp = new JButton ( "Help" ) ;
37
+ private final JComboBox <BurpCertificate > cmbboxCertificate = new JComboBox <>() ;
38
+ private final JButton btnSignatureRemove = new JButton ( "Remove Signatures" ) ;
39
+ private final JButton btnResignAssertion = new JButton ( "(Re-)Sign Assertion" ) ;
40
+ private final JButton btnSendCertificate = new JButton ( "Send Certificate to SAML Raider Certificates" ) ;
41
+ private final JButton btnResignMessage = new JButton ( "(Re-)Sign Message" ) ;
42
42
43
- private JLabel lblStatusMessage ;
43
+ private final JLabel lblStatusMessage = new JLabel ( "" ) ;
44
44
45
45
public SamlPanelAction () {
46
46
initialize ();
@@ -52,10 +52,11 @@ public SamlPanelAction(SamlTabController controller) {
52
52
}
53
53
54
54
private void initialize () {
55
- btnMessageReset = new JButton ("Reset Message" );
56
- btnMessageReset .addActionListener (event -> controller .resetMessage ());
55
+ btnMessageReset .addActionListener (event -> {
56
+ controller .resetMessage ();
57
+ lblStatusMessage .setText ("" );
58
+ });
57
59
58
- chkRawMode = new JCheckBox ("Raw Mode (don't parse XML before sending)" );
59
60
chkRawMode .addActionListener (event -> controller .setRawMode (chkRawMode .isSelected ()));
60
61
61
62
var samlMessagePanel = new JPanel ();
@@ -64,18 +65,12 @@ private void initialize() {
64
65
samlMessagePanel .add (btnMessageReset , "wrap" );
65
66
samlMessagePanel .add (chkRawMode , "wrap" );
66
67
67
- btnXSWHelp = new JButton ("Help" );
68
68
btnXSWHelp .addActionListener (event -> controller .showXSWHelp ());
69
69
70
- cmbboxXSW = new JComboBox <>();
71
-
72
- btnXSWPreview = new JButton ("Preview in Browser..." );
73
70
btnXSWPreview .addActionListener (event -> controller .showXSWPreview ());
74
71
75
- btnMatchAndReplace = new JButton ("Match and Replace" );
76
72
btnMatchAndReplace .addActionListener (event -> showMatchAndReplaceDialog ());
77
73
78
- btnXSWApply = new JButton ("Apply XSW" );
79
74
btnXSWApply .addActionListener (event -> controller .applyXSW ());
80
75
81
76
var xswAttacksPanel = new JPanel ();
@@ -87,12 +82,10 @@ private void initialize() {
87
82
xswAttacksPanel .add (btnXSWPreview );
88
83
xswAttacksPanel .add (btnXSWApply , "wrap" );
89
84
90
- btnTestXXE = new JButton ("Test XXE" );
91
85
btnTestXXE .addActionListener (event ->
92
86
Optional .ofNullable (JOptionPane .showInputDialog (btnXSWApply , "Enter Burp Collaborator URL (e.g. https://xyz.burpcollaborator.net)" ))
93
87
.ifPresent (controller ::applyXXE ));
94
88
95
- btnTestXSLT = new JButton ("Test XSLT" );
96
89
btnTestXSLT .addActionListener (event ->
97
90
Optional .ofNullable (JOptionPane .showInputDialog (btnXSWApply , "Enter Burp Collaborator URL (e.g. https://xyz.burpcollaborator.net)" ))
98
91
.ifPresent (controller ::applyXSLT ));
@@ -103,21 +96,14 @@ private void initialize() {
103
96
xmlAttacksPanel .add (btnTestXXE , "split 2" );
104
97
xmlAttacksPanel .add (btnTestXSLT , "wrap" );
105
98
106
- btnSignatureHelp = new JButton ("Help" );
107
99
btnSignatureHelp .addActionListener (event -> controller .showSignatureHelp ());
108
100
109
- cmbboxCertificate = new JComboBox <>();
110
-
111
- btnSignatureRemove = new JButton ("Remove Signatures" );
112
101
btnSignatureRemove .addActionListener (event -> controller .removeSignature ());
113
102
114
- btnResignAssertion = new JButton ("(Re-)Sign Assertion" );
115
103
btnResignAssertion .addActionListener (event -> controller .resignAssertion ());
116
104
117
- btnSendCertificate = new JButton ("Send Certificate to SAML Raider Certificates" );
118
105
btnSendCertificate .addActionListener (event -> controller .sendToCertificatesTab ());
119
106
120
- btnResignMessage = new JButton ("(Re-)Sign Message" );
121
107
btnResignMessage .addActionListener (event -> controller .resignMessage ());
122
108
123
109
var signatureAttacksPanel = new JPanel ();
@@ -130,7 +116,6 @@ private void initialize() {
130
116
signatureAttacksPanel .add (btnResignAssertion );
131
117
signatureAttacksPanel .add (btnResignMessage , "wrap" );
132
118
133
- lblStatusMessage = new JLabel ("" );
134
119
lblStatusMessage .setForeground (new Color (255 , 140 , 0 ));
135
120
136
121
var statusMessagePanel = new JPanel ();
0 commit comments