diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/discord/DiscordParser.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/discord/DiscordParser.java index d759fd4202..3ab981ae02 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/discord/DiscordParser.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/discord/DiscordParser.java @@ -150,7 +150,8 @@ public void parse(InputStream indexFile, ContentHandler handler, Metadata metada // Checking attachments image for (DiscordAttachment att : dr.getAttachments()) { - if (ce2.getRequestURL().contains(att.getUrl().split("https://cdn.discordapp.com/attachments/")[1])) { + String[] parts = att.getUrl().split("https://cdn.discordapp.com/attachments/"); + if (parts.length > 1 && ce2.getRequestURL().contains(parts[1])) { for (IItemReader ib : externalFiles) { if (ib.getName() != null && ib.getName().equals(ce2.getName())) { att.setMediaHash(ib.getHash());