From 3157a37db18c6ed95eb6baed3fb0d5c663ac4a4c Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Tue, 16 Jun 2015 13:39:55 -0400 Subject: [PATCH 01/11] sanitize case names for database, Solr, and ActiveMQ --- .../sleuthkit/autopsy/casemodule/Case.java | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index aaf22a5509..554ed9e2cb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -79,7 +79,8 @@ public class Case { private static final String EVENT_CHANNEL_NAME = "%s-Case-Events"; private static String appName = null; private static IntervalErrorReportData tskErrorReporter = null; - + private static final int MAX_SANITIZED_NAME_LENGTH=48; + /** * Name for the property that determines whether to show the dialog at * startup @@ -363,7 +364,8 @@ public class Case { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); Date date = new Date(); - String indexName = caseName + "_" + dateFormat.format(date); + String santizedCaseName = sanitizeCaseName(caseName); + String indexName = santizedCaseName + "_" + dateFormat.format(date); String dbName = null; @@ -371,7 +373,7 @@ public class Case { if (caseType == CaseType.SINGLE_USER_CASE) { dbName = caseDir + File.separator + "autopsy.db"; //NON-NLS } else if (caseType == CaseType.MULTI_USER_CASE) { - dbName = caseName + "_" + dateFormat.format(date); + dbName = santizedCaseName + "_" + dateFormat.format(date); } xmlcm.create(caseDir, caseName, examiner, caseNumber, caseType, dbName, indexName); // create a new XML config file @@ -398,6 +400,47 @@ public class Case { changeCase(newCase); } + /** + * Sanitize the case name for PostgreSQL database, Solr cores, and ActiveMQ + * topics. Makes it plain-vanilla enough that each item should be able to + * use it. + * + * @param caseName The name of the case as typed in by the user + * @return the sanitized case name to use for Database, Solr, and ActiveMQ + */ + private static String sanitizeCaseName(String caseName) { + + String result; + + // Remove all non-ASCII characters + result = caseName.replaceAll("[^\\p{ASCII}]", ""); + + // Remove all control characters + result = result.replaceAll("[\\p{Cntrl}]", ""); + + // Remove / \ : ? space ' " + result = result.replaceAll("[ /?:'\"\\\\]", ""); + + // Make it all lowercase + result = result.toLowerCase(); + + // Must start with letter or underscore. If not, prepend an underscore. + if (result.length() > 0 && !(Character.isLetter(result.codePointAt(0))) && !(result.codePointAt(0) == '_')) { + result = "_" + result; + } + + // Chop to 63-13=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) + if (result.length() > MAX_SANITIZED_NAME_LENGTH) { + result = result.substring(0, MAX_SANITIZED_NAME_LENGTH); + } + + if (result.isEmpty()) { + result = "case"; + } + + return result; + } + /** * Opens the existing case (open the XML config file) * From 6c2fb1165ad441b9e400bb34d7b4a078b7e00b12 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Tue, 16 Jun 2015 13:54:20 -0400 Subject: [PATCH 02/11] Typo in comment made math look silly. --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 554ed9e2cb..8987d2c267 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -429,7 +429,7 @@ public class Case { result = "_" + result; } - // Chop to 63-13=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) + // Chop to 63-15=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) if (result.length() > MAX_SANITIZED_NAME_LENGTH) { result = result.substring(0, MAX_SANITIZED_NAME_LENGTH); } From db9b252b3784d2ade06afc20b4e704bcb72818c2 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Tue, 16 Jun 2015 14:23:03 -0400 Subject: [PATCH 03/11] change to underscores, not blanks --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 554ed9e2cb..14f508da31 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -366,14 +366,13 @@ public class Case { Date date = new Date(); String santizedCaseName = sanitizeCaseName(caseName); String indexName = santizedCaseName + "_" + dateFormat.format(date); - String dbName = null; // figure out the database name and index name for text extraction if (caseType == CaseType.SINGLE_USER_CASE) { dbName = caseDir + File.separator + "autopsy.db"; //NON-NLS } else if (caseType == CaseType.MULTI_USER_CASE) { - dbName = santizedCaseName + "_" + dateFormat.format(date); + dbName = indexName; } xmlcm.create(caseDir, caseName, examiner, caseNumber, caseType, dbName, indexName); // create a new XML config file @@ -413,23 +412,23 @@ public class Case { String result; // Remove all non-ASCII characters - result = caseName.replaceAll("[^\\p{ASCII}]", ""); + result = caseName.replaceAll("[^\\p{ASCII}]", "_"); // Remove all control characters - result = result.replaceAll("[\\p{Cntrl}]", ""); + result = result.replaceAll("[\\p{Cntrl}]", "_"); // Remove / \ : ? space ' " - result = result.replaceAll("[ /?:'\"\\\\]", ""); + result = result.replaceAll("[ /?:'\"\\\\]", "_"); // Make it all lowercase result = result.toLowerCase(); - // Must start with letter or underscore. If not, prepend an underscore. + // Must start with letter or underscore for PostgreSQL. If not, prepend an underscore. if (result.length() > 0 && !(Character.isLetter(result.codePointAt(0))) && !(result.codePointAt(0) == '_')) { result = "_" + result; } - // Chop to 63-13=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) + // Chop to 63-15=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) if (result.length() > MAX_SANITIZED_NAME_LENGTH) { result = result.substring(0, MAX_SANITIZED_NAME_LENGTH); } From 12a33d8658d59a5fe3c4146157cce88a5b0a38c7 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Tue, 16 Jun 2015 15:52:31 -0400 Subject: [PATCH 04/11] Count underscore --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 14f508da31..4ebd35f347 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -79,7 +79,7 @@ public class Case { private static final String EVENT_CHANNEL_NAME = "%s-Case-Events"; private static String appName = null; private static IntervalErrorReportData tskErrorReporter = null; - private static final int MAX_SANITIZED_NAME_LENGTH=48; + private static final int MAX_SANITIZED_NAME_LENGTH=47; /** * Name for the property that determines whether to show the dialog at @@ -428,7 +428,7 @@ public class Case { result = "_" + result; } - // Chop to 63-15=48 left (63 max for PostgreSQL, taking 15 for the date 20151225_123456) + // Chop to 63-16=47 left (63 max for PostgreSQL, taking 16 for the date _20151225_123456) if (result.length() > MAX_SANITIZED_NAME_LENGTH) { result = result.substring(0, MAX_SANITIZED_NAME_LENGTH); } From dbdd346f81cff3c2743ba3a59597c24acdecbae6 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Wed, 17 Jun 2015 08:58:52 -0400 Subject: [PATCH 05/11] comment where each requirement comes from --- .../org/sleuthkit/autopsy/casemodule/Case.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 4ebd35f347..effb203012 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -404,6 +404,24 @@ public class Case { * topics. Makes it plain-vanilla enough that each item should be able to * use it. * + * Sanitize the PostgreSQL/Solr core, and ActiveMQ name by excluding: + * Control characters + * Non-ASCII characters + * Various others shown below + * + * Solr: http://stackoverflow.com/questions/29977519/what-makes-an-invalid-core-name + * may not be / \ : + * + * ActiveMQ: http://activemq.2283324.n4.nabble.com/What-are-limitations-restrictions-on-destination-name-td4664141.html + * may not be ? + * + * PostgreSQL: http://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html + * 63 chars max, must start with a-z or _ following chars can be + * letters _ or digits + * + * SQLite: Uses autopsy.db for the database name + * follows Windows naming convention + * * @param caseName The name of the case as typed in by the user * @return the sanitized case name to use for Database, Solr, and ActiveMQ */ From be9fd906a49683b7bf92690ba17c8616146c659e Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Wed, 17 Jun 2015 09:26:00 -0400 Subject: [PATCH 06/11] Warn if failure, allow retry --- .../autopsy/casemodule/Bundle.properties | 3 ++ .../sleuthkit/autopsy/casemodule/Case.java | 2 +- .../casemodule/MissingImageDialog.form | 33 ++++++++++++++--- .../casemodule/MissingImageDialog.java | 35 ++++++++++++------- .../imagegallery/ImageGalleryController.java | 4 +-- 5 files changed, 57 insertions(+), 20 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 25d66a057f..28b49a15c1 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -189,6 +189,7 @@ MissingImageDialog.allDesc.text=All Supported Types MissingImageDialog.display.title=Search for Missing Image MissingImageDialog.confDlg.noFileSel.msg=No image file has been selected, are you sure you\nwould like to exit without finding the image. MissingImageDialog.confDlg.noFileSel.title=Missing Image +MissingImageDialog.ErrorSettingImage=Error setting image path. Please try again. NewCaseVisualPanel1.getName.text=Case Info NewCaseVisualPanel1.caseDirBrowse.selectButton.text=Select NewCaseVisualPanel1.badCredentials.text=Bad multi-user settings. See Tools, Options, Multi-user. @@ -249,3 +250,5 @@ CollaborationMonitor.restoredService.notify.title=Collaboration Service Restored CollaborationMonitor.restoredDbService.notify.msg=Connection to database server restored CollaborationMonitor.restoredSolrService.notify.msg=Connection to keyword search server restored CollaborationMonitor.restoredMessageService.notify.msg=Connection to messaging server restored +MissingImageDialog.lbWarning.text= +MissingImageDialog.lbWarning.toolTipText= diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 4ebd35f347..1898d9878f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -540,7 +540,7 @@ public class Case { int ret = JOptionPane.showConfirmDialog(null, NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.msg", - appName, path), + getAppName(), path), NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.title"), JOptionPane.YES_NO_OPTION); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.form b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.form index d730da08dc..8225797395 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.form @@ -112,10 +112,15 @@ - - - - + + + + + + + + + @@ -127,7 +132,9 @@ - + + + @@ -153,6 +160,22 @@ + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java index 598772401c..4877d909c9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java @@ -64,8 +64,7 @@ class MissingImageDialog extends javax.swing.JDialog { fc.addChoosableFileFilter(rawFilter); fc.addChoosableFileFilter(encaseFilter); fc.setFileFilter(allFilter); - - + customInit(); } @@ -138,6 +137,7 @@ class MissingImageDialog extends javax.swing.JDialog { containerPanel = new javax.swing.JPanel(); pathNameTextField = new javax.swing.JTextField(); browseButton = new javax.swing.JButton(); + lbWarning = new javax.swing.JLabel(); titleLabel = new javax.swing.JLabel(); titleSeparator = new javax.swing.JSeparator(); @@ -192,16 +192,24 @@ class MissingImageDialog extends javax.swing.JDialog { } }); + lbWarning.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + lbWarning.setForeground(new java.awt.Color(244, 0, 0)); + org.openide.awt.Mnemonics.setLocalizedText(lbWarning, org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.lbWarning.text")); // NOI18N + lbWarning.setToolTipText(org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.lbWarning.toolTipText")); // NOI18N + javax.swing.GroupLayout containerPanelLayout = new javax.swing.GroupLayout(containerPanel); containerPanel.setLayout(containerPanelLayout); containerPanelLayout.setHorizontalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(containerPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(browseButton) - .addContainerGap(83, Short.MAX_VALUE)) + .addGroup(containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbWarning, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(containerPanelLayout.createSequentialGroup() + .addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(browseButton) + .addContainerGap(83, Short.MAX_VALUE)))) ); containerPanelLayout.setVerticalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -210,12 +218,13 @@ class MissingImageDialog extends javax.swing.JDialog { .addGroup(containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(pathNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(browseButton)) - .addContainerGap(62, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(lbWarning, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE) + .addGap(18, 18, 18)) ); - titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 12)); - org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle - .getMessage(MissingImageDialog.class, "MissingImageDialog.titleLabel.text")); // NOI18N + titleLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.titleLabel.text")); // NOI18N titleSeparator.setForeground(new java.awt.Color(102, 102, 102)); @@ -255,10 +264,11 @@ class MissingImageDialog extends javax.swing.JDialog { String newPath = pathNameTextField.getText(); //TODO handle local files db.setImagePaths(obj_id, Arrays.asList(new String[]{newPath})); + this.dispose(); } catch (TskCoreException ex) { + lbWarning.setText(NbBundle.getMessage(this.getClass(), "MissingImageDialog.ErrorSettingImage")); logger.log(Level.WARNING, "Error setting image paths", ex); //NON-NLS } - this.dispose(); }//GEN-LAST:event_selectButtonActionPerformed private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed @@ -274,7 +284,7 @@ class MissingImageDialog extends javax.swing.JDialog { private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed String oldText = pathNameTextField.getText(); - + lbWarning.setText(""); // set the current directory of the FileChooser if the ImagePath Field is valid File currentDir = new File(oldText); if (currentDir.exists()) { @@ -295,6 +305,7 @@ class MissingImageDialog extends javax.swing.JDialog { private javax.swing.JPanel buttonPanel; private javax.swing.JButton cancelButton; private javax.swing.JPanel containerPanel; + private javax.swing.JLabel lbWarning; private javax.swing.JTextField pathNameTextField; private javax.swing.JButton selectButton; private javax.swing.JLabel titleLabel; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java index b9c773b380..1e8bac9819 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryController.java @@ -837,7 +837,7 @@ public final class ImageGalleryController { for (FileSystem fs : image.getFileSystems()) { fsObjIds.add(fs.getId()); } - fsQuery = "(fs_obj_id = " + StringUtils.join(fsObjIds, " or fs_obj_id = ") + ") "; + fsQuery = "(fs_obj_id = " + StringUtils.join(fsObjIds, " OR fs_obj_id = ") + ") "; } // NOTE: Logical files currently (Apr '15) have a null value for fs_obj_id in DB. // for them, we will not specify a fs_obj_id, which means we will grab files // from another data source, but the drawable DB is smart enough to de-dupe them. @@ -845,7 +845,7 @@ public final class ImageGalleryController { fsQuery = "(fs_obj_id IS NULL) "; } - files = getSleuthKitCase().findAllFilesWhere(fsQuery + " and " + DRAWABLE_QUERY); + files = getSleuthKitCase().findAllFilesWhere(fsQuery + " AND " + DRAWABLE_QUERY); progressHandle.switchToDeterminate(files.size()); //do in transaction From 8dda2c583975c722bd3d47779fd2c4a8aa481055 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Wed, 17 Jun 2015 14:12:24 -0400 Subject: [PATCH 07/11] no popup when not interactive --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 4ebd35f347..a3a992d24a 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -536,7 +536,7 @@ public class Case { String path = entry.getValue(); boolean fileExists = (pathExists(path) || driveExists(path)); - if (!fileExists) { + if (!fileExists && IngestManager.getInstance().isRunningInteractively() == true) { int ret = JOptionPane.showConfirmDialog(null, NbBundle.getMessage(Case.class, "Case.checkImgExist.confDlg.doesntExist.msg", From ff0d4769b73b82756853296879b407e7d6dabb40 Mon Sep 17 00:00:00 2001 From: Karl Mortensen Date: Wed, 17 Jun 2015 15:22:33 -0400 Subject: [PATCH 08/11] trim whitespace in multiuserpanel items --- .../MultiUserSettingsPanel.form | 10 ++--- .../MultiUserSettingsPanel.java | 42 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.form index 723f7b999b..0b9de1eaef 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.form @@ -52,16 +52,16 @@ - - + + - + - + - + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java index a5c586ae72..34939169c9 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java @@ -322,15 +322,15 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnOverallPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(cbEnableMultiUser) - .addComponent(lbOops)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbEnableMultiUser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbOops, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(16, 16, 16) .addComponent(pnDatabaseSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pnSolrSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(pnSolrSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pnMessagingSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) + .addGap(35, 35, 35)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -378,22 +378,22 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { void load() { CaseDbConnectionInfo dbInfo = UserPreferences.getDatabaseConnectionInfo(); - tbHostnameOrIp.setText(dbInfo.getHost()); - tbPortNumber.setText(dbInfo.getPort()); - tbUsername.setText(dbInfo.getUserName()); + tbHostnameOrIp.setText(dbInfo.getHost().trim()); + tbPortNumber.setText(dbInfo.getPort().trim()); + tbUsername.setText(dbInfo.getUserName().trim()); tbPassword.setText(dbInfo.getPassword()); MessageServiceConnectionInfo msgServiceInfo = UserPreferences.getMessageServiceConnectionInfo(); - msgHostTextField.setText(msgServiceInfo.getHost()); - msgPortTextField.setText(msgServiceInfo.getPort()); - msgUserNameTextField.setText(msgServiceInfo.getUserName()); + msgHostTextField.setText(msgServiceInfo.getHost().trim()); + msgPortTextField.setText(msgServiceInfo.getPort().trim()); + msgUserNameTextField.setText(msgServiceInfo.getUserName().trim()); msgPasswordField.setText(msgServiceInfo.getPassword()); - String indexingServerHost = UserPreferences.getIndexingServerHost(); + String indexingServerHost = UserPreferences.getIndexingServerHost().trim(); if (!indexingServerHost.isEmpty()) { tbIndexingServerHost.setText(indexingServerHost); } - String indexingServerPort = UserPreferences.getIndexingServerPort(); + String indexingServerPort = UserPreferences.getIndexingServerPort().trim(); if (portNumberIsValid(indexingServerPort)) { tbIndexingServerPort.setText(indexingServerPort); } @@ -427,23 +427,23 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { } CaseDbConnectionInfo info = new CaseDbConnectionInfo( - tbHostnameOrIp.getText(), - tbPortNumber.getText(), - tbUsername.getText(), + tbHostnameOrIp.getText().trim(), + tbPortNumber.getText().trim(), + tbUsername.getText().trim(), new String(tbPassword.getPassword()), dbType); UserPreferences.setDatabaseConnectionInfo(info); MessageServiceConnectionInfo msgServiceInfo = new MessageServiceConnectionInfo( - msgUserNameTextField.getText(), + msgUserNameTextField.getText().trim(), new String(msgPasswordField.getPassword()), - msgHostTextField.getText(), - msgPortTextField.getText()); + msgHostTextField.getText().trim(), + msgPortTextField.getText().trim()); UserPreferences.setMessageServiceConnectionInfo(msgServiceInfo); - UserPreferences.setIndexingServerHost(tbIndexingServerHost.getText()); - UserPreferences.setIndexingServerPort(Integer.parseInt(tbIndexingServerPort.getText())); + UserPreferences.setIndexingServerHost(tbIndexingServerHost.getText().trim()); + UserPreferences.setIndexingServerPort(Integer.parseInt(tbIndexingServerPort.getText().trim())); } From eaeddeb236861c3ab1da94601f24b01c9ccfe6fe Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Wed, 17 Jun 2015 15:34:53 -0400 Subject: [PATCH 09/11] Changes to have org.sleuthkit.autopsy.events exported --- Core/nbproject/project.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 7a49d6f323..694754af69 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -192,6 +192,7 @@ org.sleuthkit.autopsy.coreutils org.sleuthkit.autopsy.datamodel org.sleuthkit.autopsy.directorytree + org.sleuthkit.autopsy.events org.sleuthkit.autopsy.externalresults org.sleuthkit.autopsy.filesearch org.sleuthkit.autopsy.ingest @@ -200,6 +201,7 @@ org.sleuthkit.autopsy.modules.filetypeid org.sleuthkit.autopsy.modules.hashdatabase org.sleuthkit.autopsy.report + org.sleuthkit.autopsy.timeline.events org.sleuthkit.datamodel From 5e30637359e886ad8dd6d59454b603ab52ab2733 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Wed, 17 Jun 2015 15:38:38 -0400 Subject: [PATCH 10/11] Minor --- Core/nbproject/project.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 694754af69..9368f34365 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -193,6 +193,7 @@ org.sleuthkit.autopsy.datamodel org.sleuthkit.autopsy.directorytree org.sleuthkit.autopsy.events + org.sleuthkit.autopsy.examples org.sleuthkit.autopsy.externalresults org.sleuthkit.autopsy.filesearch org.sleuthkit.autopsy.ingest @@ -201,7 +202,6 @@ org.sleuthkit.autopsy.modules.filetypeid org.sleuthkit.autopsy.modules.hashdatabase org.sleuthkit.autopsy.report - org.sleuthkit.autopsy.timeline.events org.sleuthkit.datamodel From 01b15bd04fe1f9bda9ed20875489725ffda11293 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Wed, 17 Jun 2015 15:39:34 -0400 Subject: [PATCH 11/11] Minor --- Core/nbproject/project.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 9368f34365..3b1cc8dbd9 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -193,7 +193,6 @@ org.sleuthkit.autopsy.datamodel org.sleuthkit.autopsy.directorytree org.sleuthkit.autopsy.events - org.sleuthkit.autopsy.examples org.sleuthkit.autopsy.externalresults org.sleuthkit.autopsy.filesearch org.sleuthkit.autopsy.ingest