Commit 78a53a1f authored by Tiago Cunha's avatar Tiago Cunha

Fixes invalid hostname

parent 636e137d
......@@ -31,6 +31,7 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Random;
import chat.rocket.android.activity.MainActivity;
import chat.rocket.android.helper.ServerPolicyHelper;
public class PushNotificationHandler implements PushConstants {
......@@ -633,7 +634,7 @@ public class PushNotificationHandler implements PushConstants {
return null;
}
return jsonObject.getString("host");
return ServerPolicyHelper.enforceHostname(jsonObject.getString("host"));
} catch (Exception e) {
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment