Provision for profiles being sent with messages

dbus-notify
Zlatin Balevsky 2022-04-16 14:15:48 +01:00
parent 1b15941fd7
commit dd38f77dbb
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 7 additions and 0 deletions

View File

@ -740,6 +740,13 @@ class ConnectionAcceptor {
throw new Exception("unrecognized version")
int count = Integer.parseInt(headers['Count'])
if (headers.containsKey("Profile") && Boolean.parseBoolean(headers['Profile'])) {
int profileLength = dis.readInt()
if (profileLength > Constants.MAX_PROFILE_LENGTH)
throw new IOException("Profile too big $profileLength")
dis.skipBytes(profileLength) // skip for now
}
dis = new DataInputStream(new GZIPInputStream(dis))
count.times {
MWMessage m = new MWMessage(dis)