@Override public boolean accept(Stanza packet) { // First filter out everything that is not an IQ stanza and does not have the correct ID set. if (!iqAndIdFilter.accept(packet)) return false; // Second, check if the from attributes are correct and log potential IQ spoofing attempts if (fromFilter.accept(packet)) { return true; } else { String msg = String.format("Rejected potentially spoofed reply to IQ-packet. Filter settings: " + "packetId=%s, to=%s, local=%s, server=%s. Received packet with from=%s", packetId, to, local, server, packet.getFrom()); LOGGER.log(Level.WARNING, msg , packet); return false; } }
@Override public boolean accept(Stanza packet) { // First filter out everything that is not an IQ stanza and does not have the correct ID set. if (!iqAndIdFilter.accept(packet)) return false; // Second, check if the from attributes are correct and log potential IQ spoofing attempts if (fromFilter.accept(packet)) { return true; } else { String msg = String.format("Rejected potentially spoofed reply to IQ-packet. Filter settings: " + "packetId=%s, to=%s, local=%s, server=%s. Received packet with from=%s", packetId, to, local, server, packet.getFrom()); LOGGER.log(Level.WARNING, msg , packet); return false; } }
@Override public boolean accept(Stanza stanza) { // First filter out everything that is not an IQ stanza and does not have the correct ID set. if (!iqAndIdFilter.accept(stanza)) { return false; } // Second, check if the from attributes are correct and log potential IQ spoofing attempts if (fromFilter.accept(stanza)) { return true; } else { logger.warn(String.format( "Rejected potentially spoofed reply to IQ-stanza. Filter settings: " + "stanzaId=%s, to=%s, local=%s, server=%s. Received stanza with from=%s", stanzaId, to, local, server, stanza.getFrom()), stanza); return false; } }