Merge pull request #1641 from fiaxh/uuid-fix

Correct uuid check according to RFC 4122
This commit is contained in:
Daniel Gultsch 2016-01-08 00:17:21 +01:00
commit 5dd5685885

View file

@ -363,7 +363,7 @@ public class Message extends AbstractEntity {
&& this.counterpart.equals(message.getCounterpart()) && this.counterpart.equals(message.getCounterpart())
&& (body.equals(otherBody) && (body.equals(otherBody)
||(message.getEncryption() == Message.ENCRYPTION_PGP ||(message.getEncryption() == Message.ENCRYPTION_PGP
&& message.getRemoteMsgId().matches("[0-9a-f]{8}-[0-9a-f]{4}-4[0-9]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"))) ; && message.getRemoteMsgId().matches("[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"))) ;
} else { } else {
return this.remoteMsgId == null return this.remoteMsgId == null
&& this.counterpart.equals(message.getCounterpart()) && this.counterpart.equals(message.getCounterpart())