Compare commits

..
4 Commits
Author SHA1 Message Date
Moxie Marlinspike 39e3366b3b Bump version to 0.54
// FREEBIE
2015-06-25 11:02:00 -07:00
Moxie Marlinspike a5ffd47935 Gotta stub out message field for delivery receipts w/ old clients
// FREEBIE
2015-06-25 11:00:59 -07:00
Moxie Marlinspike 18a96a445b Bump version to 0.53 2015-06-25 08:51:09 -07:00
Moxie Marlinspike de366b976e Ignore unknown properties from federated responses.
// FREEBIE
2015-06-25 08:50:10 -07:00
4 changed files with 16 additions and 4 deletions

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>TextSecureServer</artifactId>
<version>0.52</version>
<version>0.54</version>
<properties>
<dropwizard.version>0.7.1</dropwizard.version>
+1 -1
View File
@@ -33,7 +33,7 @@ message Envelope {
optional uint32 sourceDevice = 7;
optional string relay = 3;
optional uint64 timestamp = 5;
optional bytes legacyMessage = 6; // Contains an encrypted DataMessage
optional bytes legacyMessage = 6; // Contains an encrypted DataMessage XXX -- Remove after 10/01/15
optional bytes content = 8; // Contains an encrypted Content
}
@@ -17,6 +17,8 @@
package org.whispersystems.textsecuregcm.federation;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import com.google.common.base.Optional;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientHandlerException;
@@ -234,6 +236,7 @@ public class FederatedClient {
config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
new HTTPSProperties(new StrictHostnameVerifier(), sslContext));
config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
config.getSingletons().add(new JacksonJsonProvider().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false));
return config;
}
@@ -66,13 +66,22 @@ public abstract class Messages {
public OutgoingMessageEntity map(int i, ResultSet resultSet, StatementContext statementContext)
throws SQLException
{
int type = resultSet.getInt(TYPE);
byte[] legacyMessage = resultSet.getBytes(MESSAGE);
if (type == Envelope.Type.RECEIPT_VALUE && legacyMessage == null) {
/// XXX - REMOVE AFTER 10/01/15
legacyMessage = new byte[0];
}
return new OutgoingMessageEntity(resultSet.getLong(ID),
resultSet.getInt(TYPE),
type,
resultSet.getString(RELAY),
resultSet.getLong(TIMESTAMP),
resultSet.getString(SOURCE),
resultSet.getInt(SOURCE_DEVICE),
resultSet.getBytes(MESSAGE),
legacyMessage,
resultSet.getBytes(CONTENT));
}
}