mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #5776 from raman-bt/6229-cr-custom-account-exception
6229: SEVERE errors from CR failing to handle custom account types
This commit is contained in:
commit
84fb91e287
@ -211,8 +211,12 @@ public class CorrelationAttributeUtil {
|
|||||||
BlackboardAttribute accountTypeAttribute = acctArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE));
|
BlackboardAttribute accountTypeAttribute = acctArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE));
|
||||||
String accountTypeStr = accountTypeAttribute.getValueString();
|
String accountTypeStr = accountTypeAttribute.getValueString();
|
||||||
|
|
||||||
|
// @@TODO Vik-6136: CR currently does not know of custom account types.
|
||||||
|
// Ensure there is a predefined account type for this account.
|
||||||
|
Account.Type predefinedAccountType = Account.Type.PREDEFINED_ACCOUNT_TYPES.stream().filter(type -> type.getTypeName().equalsIgnoreCase(accountTypeStr)).findAny().orElse(null);
|
||||||
|
|
||||||
// do not create any correlation attribute instance for a Device account
|
// do not create any correlation attribute instance for a Device account
|
||||||
if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false) {
|
if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false && predefinedAccountType != null) {
|
||||||
|
|
||||||
// Get the corresponding CentralRepoAccountType from the database.
|
// Get the corresponding CentralRepoAccountType from the database.
|
||||||
CentralRepoAccountType crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr);
|
CentralRepoAccountType crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user