diff --git a/BUILDING.txt b/BUILDING.txt
index 570cadbf87..a77d6c8add 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -37,16 +37,16 @@ to the root 64-bit JRE directory.
2) Get Sleuth Kit Setup
2a) Download and build a Release version of Sleuth Kit (TSK) 4.0. See
win32\BUILDING.txt in the TSK package for more information. You need to
- build the tsk_jni project. Select the Release_PostgreSQL Win32 or x64 target,
+ build the tsk_jni project. Select the Release Win32 or x64 target,
depending upon your target build. You can use a released version or download
the latest from github:
- git://github.com/sleuthkit/sleuthkit.git
-2b) Build the TSK JAR file by typing 'ant dist-PostgreSQL' in
+2b) Build the TSK JAR file by typing 'ant dist' in
bindings/java in the
TSK source code folder from a command line. Note it is case
sensitive. You can also add the code to a NetBeans project and build
- it from there, selecting the dist-PostgreSQL target.
+ it from there, selecting the dist target.
2c) Set TSK_HOME environment variable to the root directory of TSK
@@ -103,7 +103,7 @@ the build process.
- The Sleuth Kit Java datamodel JAR file has native JNI libraries
that are copied into it. These JNI libraries have dependencies on
-libewf, zlib, libpq, libintl-8, libeay32, and ssleay32 DLL files. On non-Windows
+libewf, zlib, libintl-8, libeay32, and ssleay32 DLL files. On non-Windows
platforms, the JNI library also has a dependency on libtsk (on Windows,
it is compiled into libtsk_jni).
diff --git a/Core/build.xml b/Core/build.xml
index 8ac5c13d99..52f12a4b0b 100644
--- a/Core/build.xml
+++ b/Core/build.xml
@@ -59,6 +59,11 @@
+
+
+
+
+
diff --git a/Core/nbproject/project.properties b/Core/nbproject/project.properties
index 1898db811c..8dbd7f8d92 100644
--- a/Core/nbproject/project.properties
+++ b/Core/nbproject/project.properties
@@ -83,7 +83,7 @@ file.reference.sevenzipjbinding.jar=release/modules/ext/sevenzipjbinding.jar
file.reference.sis-metadata-0.8.jar=release\\modules\\ext\\sis-metadata-0.8.jar
file.reference.sis-netcdf-0.8.jar=release\\modules\\ext\\sis-netcdf-0.8.jar
file.reference.sis-utility-0.8.jar=release\\modules\\ext\\sis-utility-0.8.jar
-file.reference.sleuthkit-caseuco-4.9.0.jar=release\\modules\\ext\\sleuthkit-caseuco-4.9.0.jar
+file.reference.sleuthkit-caseuco-4.10.0.jar=release/modules/ext/sleuthkit-caseuco-4.10.0.jar
file.reference.slf4j-api-1.7.25.jar=release\\modules\\ext\\slf4j-api-1.7.25.jar
file.reference.sqlite-jdbc-3.25.2.jar=release/modules/ext/sqlite-jdbc-3.25.2.jar
file.reference.StixLib.jar=release/modules/ext/StixLib.jar
@@ -91,7 +91,7 @@ file.reference.javax.ws.rs-api-2.0.1.jar=release/modules/ext/javax.ws.rs-api-2.0
file.reference.cxf-core-3.0.16.jar=release/modules/ext/cxf-core-3.0.16.jar
file.reference.cxf-rt-frontend-jaxrs-3.0.16.jar=release/modules/ext/cxf-rt-frontend-jaxrs-3.0.16.jar
file.reference.cxf-rt-transports-http-3.0.16.jar=release/modules/ext/cxf-rt-transports-http-3.0.16.jar
-file.reference.sleuthkit-4.9.0.jar=release/modules/ext/sleuthkit-4.9.0.jar
+file.reference.sleuthkit-4.10.0.jar=release/modules/ext/sleuthkit-4.10.0.jar
file.reference.curator-client-2.8.0.jar=release/modules/ext/curator-client-2.8.0.jar
file.reference.curator-framework-2.8.0.jar=release/modules/ext/curator-framework-2.8.0.jar
file.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0.jar
diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml
index b751ffbf07..61e6a86b04 100644
--- a/Core/nbproject/project.xml
+++ b/Core/nbproject/project.xml
@@ -472,8 +472,8 @@
release/modules/ext/commons-pool2-2.4.2.jar
- ext/sleuthkit-4.9.0.jar
- release/modules/ext/sleuthkit-4.9.0.jar
+ ext/sleuthkit-4.10.0.jar
+ release/modules/ext/sleuthkit-4.10.0.jar
ext/jxmapviewer2-2.4.jar
@@ -780,8 +780,8 @@
release/modules/ext/curator-client-2.8.0.jar
- ext/sleuthkit-caseuco-4.9.0.jar
- release\modules\ext\sleuthkit-caseuco-4.9.0.jar
+ ext/sleuthkit-caseuco-4.10.0.jar
+ release/modules/ext/sleuthkit-caseuco-4.10.0.jar
ext/fontbox-2.0.13.jar
diff --git a/Core/src/org/sleuthkit/autopsy/actions/DeleteContentTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/DeleteContentTagAction.java
index b7ff3a73a0..b6c882cd5e 100644
--- a/Core/src/org/sleuthkit/autopsy/actions/DeleteContentTagAction.java
+++ b/Core/src/org/sleuthkit/autopsy/actions/DeleteContentTagAction.java
@@ -29,6 +29,9 @@ import org.openide.util.Utilities;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ContentViewerTag;
+import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagRegion;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.ContentTag;
import org.sleuthkit.datamodel.TskCoreException;
@@ -72,6 +75,12 @@ public class DeleteContentTagAction extends AbstractAction {
new Thread(() -> {
for (ContentTag tag : selectedTags) {
try {
+ // Check if there is an image tag before deleting the content tag.
+ ContentViewerTag imageTag = ContentViewerTagManager.getTag(tag, ImageTagRegion.class);
+ if(imageTag != null) {
+ ContentViewerTagManager.deleteTag(imageTag);
+ }
+
Case.getCurrentCaseThrows().getServices().getTagsManager().deleteContentTag(tag);
} catch (TskCoreException | NoCurrentCaseException ex) {
Logger.getLogger(DeleteContentTagAction.class.getName()).log(Level.SEVERE, "Error deleting tag", ex); //NON-NLS
diff --git a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java
index cb719e2f0a..4141e3d29d 100644
--- a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java
+++ b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java
@@ -39,6 +39,9 @@ import org.openide.util.actions.Presenter;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ContentViewerTag;
+import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagRegion;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.tags.TagUtils;
import org.sleuthkit.datamodel.AbstractFile;
@@ -123,6 +126,13 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
try {
logger.log(Level.INFO, "Removing tag {0} from {1}", new Object[]{tagName.getDisplayName(), contentTag.getContent().getName()}); //NON-NLS
+
+ // Check if there is an image tag before deleting the content tag.
+ ContentViewerTag imageTag = ContentViewerTagManager.getTag(contentTag, ImageTagRegion.class);
+ if(imageTag != null) {
+ ContentViewerTagManager.deleteTag(imageTag);
+ }
+
tagsManager.deleteContentTag(contentTag);
} catch (TskCoreException tskCoreException) {
logger.log(Level.SEVERE, "Error untagging file", tskCoreException); //NON-NLS
diff --git a/Core/src/org/sleuthkit/autopsy/actions/ReplaceContentTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/ReplaceContentTagAction.java
index 51b898eb84..1c69bc133c 100644
--- a/Core/src/org/sleuthkit/autopsy/actions/ReplaceContentTagAction.java
+++ b/Core/src/org/sleuthkit/autopsy/actions/ReplaceContentTagAction.java
@@ -29,6 +29,9 @@ import org.openide.util.Utilities;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager;
+import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ContentViewerTag;
+import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagRegion;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.ContentTag;
import org.sleuthkit.datamodel.TagName;
@@ -83,9 +86,19 @@ public final class ReplaceContentTagAction extends ReplaceTagAction
try {
logger.log(Level.INFO, "Replacing tag {0} with tag {1} for artifact {2}", new Object[]{oldTag.getName().getDisplayName(), newTagName.getDisplayName(), oldTag.getContent().getName()}); //NON-NLS
+ // Check if there is an image tag before deleting the content tag.
+ ContentViewerTag imageTag = ContentViewerTagManager.getTag(oldTag, ImageTagRegion.class);
+ if(imageTag != null) {
+ ContentViewerTagManager.deleteTag(imageTag);
+ }
+
tagsManager.deleteContentTag(oldTag);
- tagsManager.addContentTag(oldTag.getContent(), newTagName, newComment);
-
+ ContentTag newTag = tagsManager.addContentTag(oldTag.getContent(), newTagName, newComment);
+
+ // Resave the image tag if present.
+ if(imageTag != null) {
+ ContentViewerTagManager.saveTag(newTag, imageTag.getDetails());
+ }
} catch (TskCoreException tskCoreException) {
logger.log(Level.SEVERE, "Error replacing artifact tag", tskCoreException); //NON-NLS
Platform.runLater(()
diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/casemodule/datasourcesummary/Bundle.properties-MERGED
old mode 100755
new mode 100644
similarity index 100%
rename from Core/src/org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle.properties-MERGED
rename to Core/src/org/sleuthkit/autopsy/casemodule/datasourcesummary/Bundle.properties-MERGED
diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/datasourcesummary/Bundle_ja.properties
similarity index 100%
rename from Core/src/org/sleuthkit/autopsy/casemodule/datasourceSummary/Bundle_ja.properties
rename to Core/src/org/sleuthkit/autopsy/casemodule/datasourcesummary/Bundle_ja.properties
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java
index 47575ad896..88c74a4fe8 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java
@@ -305,8 +305,40 @@ public final class CentralRepoAccount {
normalizedAccountIdentifier = accountIdentifier.toLowerCase().trim();
}
} catch (CorrelationAttributeNormalizationException ex) {
- throw new InvalidAccountIDException("Failed to normalize the account idenitier.", ex);
+ throw new InvalidAccountIDException("Failed to normalize the account idenitier " + accountIdentifier, ex);
}
return normalizedAccountIdentifier;
}
+
+ /**
+ * Normalizes an account identifier, based on the given account type.
+ *
+ * @param crAccountType Account type.
+ * @param accountIdentifier Account identifier to be normalized.
+ * @return Normalized identifier.
+ *
+ * @throws InvalidAccountIDException If the account identifier is invalid.
+ */
+ public static String normalizeAccountIdentifier(CentralRepoAccountType crAccountType, String accountIdentifier) throws InvalidAccountIDException {
+
+ if (StringUtils.isBlank(accountIdentifier)) {
+ throw new InvalidAccountIDException("Account identifier is null or empty.");
+ }
+
+ String normalizedAccountIdentifier;
+ try {
+ if (crAccountType.getAcctType().equals(Account.Type.PHONE)) {
+ normalizedAccountIdentifier = CorrelationAttributeNormalizer.normalizePhone(accountIdentifier);
+ } else if (crAccountType.getAcctType().equals(Account.Type.EMAIL)) {
+ normalizedAccountIdentifier = CorrelationAttributeNormalizer.normalizeEmail(accountIdentifier);
+ } else {
+ // convert to lowercase
+ normalizedAccountIdentifier = accountIdentifier.toLowerCase();
+ }
+ } catch (CorrelationAttributeNormalizationException ex) {
+ throw new InvalidAccountIDException("Invalid account identifier", ex);
+ }
+
+ return normalizedAccountIdentifier;
+ }
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUtil.java
index 6ba23b65b5..5105aed2e9 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUtil.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUtil.java
@@ -262,9 +262,7 @@ public class CentralRepoDbUtil {
* used
*/
public static void setUseCentralRepo(boolean centralRepoCheckBoxIsSelected) {
- if (!centralRepoCheckBoxIsSelected) {
- closePersonasTopComponent();
- }
+ closePersonasTopComponent();
ModuleSettings.setConfigSetting(CENTRAL_REPO_NAME, CENTRAL_REPO_USE_KEY, Boolean.toString(centralRepoCheckBoxIsSelected));
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java
index bdae5a727b..842c8e3f04 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java
@@ -27,6 +27,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount.CentralRepoAccountType;
import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
import org.sleuthkit.datamodel.HashHitInfo;
+import org.sleuthkit.datamodel.InvalidAccountIDException;
/**
* Main interface for interacting with the database
@@ -880,9 +881,24 @@ public interface CentralRepository {
* @param crAccountType CR account type to look for or create
* @param accountUniqueID type specific unique account id
* @return CR account
- *
- * @throws CentralRepoException
+ *
+ * @throws CentralRepoException If there is an error accessing Central Repository.
+ * @throws InvalidAccountIDException If the account identifier is not valid.
*/
- CentralRepoAccount getOrCreateAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID) throws CentralRepoException;
+ CentralRepoAccount getOrCreateAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException;
+
+ /**
+ * Gets an account from the accounts table matching the given type/ID, if
+ * one exists.
+ *
+ * @param crAccountType CR account type to look for or create
+ * @param accountUniqueID type specific unique account id
+ *
+ * @return CR account, if found, null otherwise.
+ *
+ * @throws CentralRepoException If there is an error accessing Central Repository.
+ * @throws InvalidAccountIDException If the account identifier is not valid.
+ */
+ CentralRepoAccount getAccount(CentralRepoAccount.CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException;
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java
index cb14bf5fa2..9af6fcde3b 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java
@@ -35,6 +35,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
import org.sleuthkit.datamodel.HashUtility;
+import org.sleuthkit.datamodel.InvalidAccountIDException;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
@@ -184,7 +185,11 @@ public class CorrelationAttributeUtil {
}
}
} catch (CorrelationAttributeNormalizationException ex) {
- logger.log(Level.SEVERE, String.format("Error normalizing correlation attribute (%s)", artifact), ex); // NON-NLS
+ logger.log(Level.WARNING, String.format("Error normalizing correlation attribute (%s)", artifact), ex); // NON-NLS
+ return correlationAttrs;
+ }
+ catch (InvalidAccountIDException ex) {
+ logger.log(Level.WARNING, String.format("Invalid account identifier (artifactID: %d)", artifact.getId())); // NON-NLS
return correlationAttrs;
}
catch (CentralRepoException ex) {
@@ -281,7 +286,7 @@ public class CorrelationAttributeUtil {
*
* @return The correlation attribute instance.
*/
- private static void makeCorrAttrFromAcctArtifact(List corrAttrInstances, BlackboardArtifact acctArtifact) throws TskCoreException, CentralRepoException {
+ private static void makeCorrAttrFromAcctArtifact(List corrAttrInstances, BlackboardArtifact acctArtifact) throws InvalidAccountIDException, TskCoreException, CentralRepoException {
// Get the account type from the artifact
BlackboardAttribute accountTypeAttribute = acctArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE));
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java
index d3195a6d3d..b48797e3fc 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java
@@ -52,6 +52,7 @@ import org.sleuthkit.autopsy.healthmonitor.TimingMetric;
import org.sleuthkit.datamodel.Account;
import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber;
import org.sleuthkit.datamodel.HashHitInfo;
+import org.sleuthkit.datamodel.InvalidAccountIDException;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskData;
@@ -1080,21 +1081,34 @@ abstract class RdbmsCentralRepo implements CentralRepository {
* within TSK core
*/
@Override
- public CentralRepoAccount getOrCreateAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws CentralRepoException {
+ public CentralRepoAccount getOrCreateAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException {
+ // Get the account fom the accounts table
+ String normalizedAccountID = CentralRepoAccount.normalizeAccountIdentifier(crAccountType, accountUniqueID);
- String insertSQL = "INSERT INTO accounts (account_type_id, account_unique_identifier) "
- + "VALUES (?, ?) " + getConflictClause();
+ // insert the account. If there is a conflict, ignore it.
+ String insertSQL;
+ switch (CentralRepoDbManager.getSavedDbChoice().getDbPlatform()) {
+ case POSTGRESQL:
+ insertSQL = "INSERT INTO accounts (account_type_id, account_unique_identifier) VALUES (?, ?) " + getConflictClause(); //NON-NLS
+ break;
+ case SQLITE:
+ insertSQL = "INSERT OR IGNORE INTO accounts (account_type_id, account_unique_identifier) VALUES (?, ?) "; //NON-NLS
+ break;
+ default:
+ throw new CentralRepoException(String.format("Cannot add account to currently selected CR database platform %s", CentralRepoDbManager.getSavedDbChoice().getDbPlatform())); //NON-NLS
+ }
+
try (Connection connection = connect();
PreparedStatement preparedStatement = connection.prepareStatement(insertSQL);) {
preparedStatement.setInt(1, crAccountType.getAccountTypeId());
- preparedStatement.setString(2, accountUniqueID); // TBD: fill in the normalized ID
+ preparedStatement.setString(2, normalizedAccountID);
preparedStatement.executeUpdate();
// get the account from the db - should exist now.
- return getAccount(crAccountType, accountUniqueID);
+ return getAccount(crAccountType, normalizedAccountID);
} catch (SQLException ex) {
throw new CentralRepoException("Error adding an account to CR database.", ex);
}
@@ -1177,15 +1191,17 @@ abstract class RdbmsCentralRepo implements CentralRepository {
* @return CentralRepoAccount for the give type/id. May return null if not
* found.
*
- * @throws CentralRepoException
+ * @throws CentralRepoException If there is an error accessing Central Repository.
+ * @throws InvalidAccountIDException If the account identifier is not valid.
*/
- private CentralRepoAccount getAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws CentralRepoException {
-
- CentralRepoAccount crAccount = accountsCache.getIfPresent(Pair.of(crAccountType, accountUniqueID));
+ @Override
+ public CentralRepoAccount getAccount(CentralRepoAccountType crAccountType, String accountUniqueID) throws InvalidAccountIDException, CentralRepoException {
+ String normalizedAccountID = CentralRepoAccount.normalizeAccountIdentifier(crAccountType, accountUniqueID);
+ CentralRepoAccount crAccount = accountsCache.getIfPresent(Pair.of(crAccountType, normalizedAccountID));
if (crAccount == null) {
- crAccount = getCRAccountFromDb(crAccountType, accountUniqueID);
+ crAccount = getCRAccountFromDb(crAccountType, normalizedAccountID);
if (crAccount != null) {
- accountsCache.put(Pair.of(crAccountType, accountUniqueID), crAccount);
+ accountsCache.put(Pair.of(crAccountType, normalizedAccountID), crAccount);
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
index 675e7c8807..f30c402513 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
@@ -43,6 +43,7 @@ import javax.swing.event.DocumentListener;
import javax.swing.filechooser.FileFilter;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
+import org.openide.windows.TopComponent;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager;
@@ -660,6 +661,8 @@ public class EamDbSettingsDialog extends JDialog {
* found.
*/
private static boolean testStatusAndCreate(Component parent, CentralRepoDbManager manager, EamDbSettingsDialog dialog) {
+ closePersonasTopComponent();
+
parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
manager.testStatus();
@@ -690,6 +693,21 @@ public class EamDbSettingsDialog extends JDialog {
parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
return true;
}
+
+
+
+ /**
+ * Closes Personas top component if it exists.
+ */
+ private static void closePersonasTopComponent() {
+ SwingUtilities.invokeLater(() -> {
+ TopComponent personasWindow = WindowManager.getDefault().findTopComponent("PersonasTopComponent");
+ if (personasWindow != null && personasWindow.isOpened()) {
+ personasWindow.close();
+ }
+ });
+ }
+
/**
* This method returns if changes to the central repository configuration
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties-MERGED
index fcc302c955..e8a7f9718a 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties-MERGED
@@ -6,6 +6,8 @@ AddMetadataDialog_empty_name_Title=Missing field(s)
CreatePersonaAccountDialog.title.text=Create Account
CreatePersonaAccountDialog_error_msg=Failed to create account.
CreatePersonaAccountDialog_error_title=Account failure
+CreatePersonaAccountDialog_invalid_account_msg=Account identifier is not valid.
+CreatePersonaAccountDialog_invalid_account_Title=Invalid account identifier
CreatePersonaAccountDialog_success_msg=Account added.
CreatePersonaAccountDialog_success_title=Account added
CTL_OpenPersonas=Personas
@@ -132,4 +134,4 @@ PersonasTopComponent_delete_exception_Title=Delete failure
PersonasTopComponent_Name=Personas
PersonasTopComponent_noCR_msg=Central Repository is not enabled.
PersonasTopComponent_search_exception_msg=Failed to search personas.
-PersonasTopComponent_search_exception_Title=Search failure
+PersonasTopComponent_search_exception_Title=There was a failure during the search. Try opening a case to fully initialize the central repository database.
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java
index ecb848da61..cfdf990710 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java
@@ -36,6 +36,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount.Cent
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
import org.sleuthkit.autopsy.coreutils.Logger;
+import org.sleuthkit.datamodel.InvalidAccountIDException;
/**
* Configuration dialog for creating an account.
@@ -216,7 +217,8 @@ public class CreatePersonaAccountDialog extends JDialog {
@Messages({
"CreatePersonaAccountDialog_error_title=Account failure",
"CreatePersonaAccountDialog_error_msg=Failed to create account.",
- })
+ "CreatePersonaAccountDialog_invalid_account_Title=Invalid account identifier",
+ "CreatePersonaAccountDialog_invalid_account_msg=Account identifier is not valid.",})
private CentralRepoAccount createAccount(CentralRepoAccount.CentralRepoAccountType type, String identifier) {
CentralRepoAccount ret = null;
try {
@@ -227,8 +229,14 @@ public class CreatePersonaAccountDialog extends JDialog {
} catch (CentralRepoException e) {
logger.log(Level.SEVERE, "Failed to create account", e);
JOptionPane.showMessageDialog(this,
- Bundle.CreatePersonaAccountDialog_error_title(),
Bundle.CreatePersonaAccountDialog_error_msg(),
+ Bundle.CreatePersonaAccountDialog_error_title(),
+ JOptionPane.ERROR_MESSAGE);
+ } catch (InvalidAccountIDException e) {
+ logger.log(Level.WARNING, "Invalid account identifier", e);
+ JOptionPane.showMessageDialog(this,
+ Bundle.CreatePersonaAccountDialog_invalid_account_msg(),
+ Bundle.CreatePersonaAccountDialog_invalid_account_Title(),
JOptionPane.ERROR_MESSAGE);
}
return ret;
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/PersonasTopComponent.java b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/PersonasTopComponent.java
index d38b379078..e051529f11 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/PersonasTopComponent.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/PersonasTopComponent.java
@@ -20,6 +20,8 @@ package org.sleuthkit.autopsy.centralrepository.persona;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -60,28 +62,6 @@ public final class PersonasTopComponent extends TopComponent {
private List currentResults = null;
private Persona selectedPersona = null;
- /**
- * Listens for when this component will be rendered and executes a search to
- * update gui when it is displayed.
- */
- private final AncestorListener onAddListener = new AncestorListener() {
- @Override
- public void ancestorAdded(AncestorEvent event) {
- resetSearchControls();
- setKeywordSearchEnabled(false, true);
- }
-
- @Override
- public void ancestorRemoved(AncestorEvent event) {
- //Empty
- }
-
- @Override
- public void ancestorMoved(AncestorEvent event) {
- //Empty
- }
- };
-
@Messages({
"PersonasTopComponent_Name=Personas",
"PersonasTopComponent_delete_exception_Title=Delete failure",
@@ -165,7 +145,17 @@ public final class PersonasTopComponent extends TopComponent {
}
});
- addAncestorListener(onAddListener);
+ /**
+ * Listens for when this component will be rendered and executes a
+ * search to update gui when it is displayed.
+ */
+ addComponentListener(new ComponentAdapter() {
+ @Override
+ public void componentShown(ComponentEvent e) {
+ resetSearchControls();
+ setKeywordSearchEnabled(false, true);
+ }
+ });
}
/**
@@ -276,7 +266,7 @@ public final class PersonasTopComponent extends TopComponent {
}
@Messages({
- "PersonasTopComponent_search_exception_Title=Search failure",
+ "PersonasTopComponent_search_exception_Title=There was a failure during the search. Try opening a case to fully initialize the central repository database.",
"PersonasTopComponent_search_exception_msg=Failed to search personas.",
"PersonasTopComponent_noCR_msg=Central Repository is not enabled.",})
private void executeSearch() {
diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTFilterRefresher.java b/Core/src/org/sleuthkit/autopsy/communications/CVTFilterRefresher.java
index 1ba9d6c81e..b5560ab825 100755
--- a/Core/src/org/sleuthkit/autopsy/communications/CVTFilterRefresher.java
+++ b/Core/src/org/sleuthkit/autopsy/communications/CVTFilterRefresher.java
@@ -65,8 +65,10 @@ abstract class CVTFilterRefresher implements RefreshThrottler.Refresher {
try (SleuthkitCase.CaseDbQuery dbQuery = skCase.executeQuery("SELECT MAX(date_time) as end, MIN(date_time) as start from account_relationships")) {
// ResultSet is closed by CasDBQuery
ResultSet rs = dbQuery.getResultSet();
+ rs.next();
startTime = rs.getInt("start"); // NON-NLS
endTime = rs.getInt("end"); // NON-NLS
+
}
// Get the devices with CVT artifacts
List deviceObjIds = new ArrayList<>();
diff --git a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
index 7bdf3a46e3..90c41e467f 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
@@ -269,6 +269,7 @@ final public class FiltersPanel extends JPanel {
* Populate the Account Types filter widgets.
*
* @param accountTypesInUse List of accountTypes currently in use
+ * @param checkNewOnes
*
* @return True, if a new accountType was found
*/
@@ -314,9 +315,8 @@ final public class FiltersPanel extends JPanel {
/**
* Populate the devices filter widgets.
*
- * @param selected Sets the initial state of device check box.
- * @param sleuthkitCase The sleuthkit case for containing the data source
- * information.
+ * @param dataSourceMap
+ * @param checkNewOnes
*
* @return true if a new device was found
*/
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties b/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties
index b14d8a2688..6ecb170c10 100755
--- a/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties
@@ -9,7 +9,6 @@ SummaryViewer.callLogsLabel.text=Call Logs:
ThreadRootMessagePanel.showAllCheckBox.text=Show All Messages
ThreadPane.backButton.text=<---
SummaryViewer.caseReferencesPanel.border.title=Other Occurrences
-SummaryViewer.fileReferencesPanel.border.title=File References in Current Case
MessageViewer.threadsLabel.text=Select a Thread to View
MessageViewer.threadNameLabel.text=
MessageViewer.showingMessagesLabel.text=Showing Messages for Thread:
@@ -27,3 +26,5 @@ SummaryViewer.referencesLabel.text=Communication References:
SummaryViewer.referencesDataLabel.text=
SummaryViewer.contactsLabel.text=Book Entries:
SummaryViewer.accountCountry.text=
+SummaryViewer.fileRefPane.border.title=File References in Current Case
+SummaryViewer.selectAccountFileRefLabel.text=