1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

DoX: Ensure that the response message ID matches the query ID

This commit is contained in:
Florian Schmaus 2019-04-09 17:02:56 +02:00
parent 474ea68d4a
commit fc45e1b905

View file

@ -97,6 +97,11 @@ public final class DnsOverXmppManager extends Manager {
return errorResponse; return errorResponse;
} }
if (query.id != response.id) {
// The ID may not match because the resolver returned a cached result.
response = response.asBuilder().setId(query.id).build();
}
DnsIq dnsIqResult = new DnsIq(response); DnsIq dnsIqResult = new DnsIq(response);
dnsIqResult.setType(IQ.Type.result); dnsIqResult.setType(IQ.Type.result);
return dnsIqResult; return dnsIqResult;