Skip to content

Commit

Permalink
sepinf-inc#2299: use getInputStreamFactory to check if local_path was…
Browse files Browse the repository at this point in the history
… set and considers only md5 with 32-bytes
  • Loading branch information
aberenguel committed Aug 20, 2024
1 parent b444097 commit a888130
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,10 @@ else if (item != null && !value.isEmpty()) {
// See https://github.com/sepinf-inc/IPED/issues/2299
String md5 = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "MD5");
String localPath = item.getMetadata().get(LOCAL_PATH_META);
if (StringUtils.isNotBlank(md5)) {
if (item.getIdInDataSource() != null && !md5ToLocalPath.containsKey(md5) && StringUtils.isNotBlank(localPath)) {
if (StringUtils.isNotBlank(md5) && md5.length() == 32) {
if (item.getInputStreamFactory() != null && !md5ToLocalPath.containsKey(md5) && StringUtils.isNotBlank(localPath)) {
md5ToLocalPath.put(md5, localPath);
} else if (item.getIdInDataSource() == null && md5ToLocalPath.containsKey(md5)) {
} else if (item.getInputStreamFactory() == null && md5ToLocalPath.containsKey(md5)) {
String seenPath = md5ToLocalPath.get(md5);
setContent(item, seenPath);
}
Expand Down

0 comments on commit a888130

Please sign in to comment.