diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTLicenseDialog.java b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTLicenseDialog.java index 495ee9d0320b7f53f8b081ad00ab9fd1e0c3ea2c..99fc749dd739bb0923293896c70eb6ca24d09b44 100644 --- a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTLicenseDialog.java +++ b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTLicenseDialog.java @@ -31,7 +31,7 @@ */ class CTLicenseDialog extends javax.swing.JDialog { - private static final Pattern LICENSE_PATTERN = Pattern.compile("^\\s*[a-zA-Z0-9\\-]+?\\s*$"); + private static final Pattern LICENSE_PATTERN = Pattern.compile("^\\s*[a-zA-Z0-9-_]+?\\s*$"); private String licenseString = null; /** @@ -191,7 +191,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }// </editor-fold>//GEN-END:initComponents private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed - this.licenseString = this.licenseNumberTextField.getText(); + String inputText = this.licenseNumberTextField.getText(); + this.licenseString = inputText == null ? null : inputText.trim(); this.dispose(); }//GEN-LAST:event_okButtonActionPerformed