diff --git a/CHANGELOG.md b/CHANGELOG.md
index b7ef6c6fa..81c2d9e1f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,20 @@
# Changelog
+### Version 2.10.5
+
+* Security: Stop downloading files that exceed advertised file size
+* Security: Limit POSH files to 10K
+
+### Version 2.10.4
+
+* Fix interaction with Google Maps Share Location Plugin
+* Remove footnote with regards to server fee
+
### Version 2.10.3
* Store files in location appropriate for Android 11
* Attempt to reconnect call after network switch
+* Show caller JID and account JID in incoming call screen
### Version 2.10.2
diff --git a/art/message_bubble_received_obsidian.svg b/art/message_bubble_received_obsidian.svg
new file mode 100644
index 000000000..a1e743733
--- /dev/null
+++ b/art/message_bubble_received_obsidian.svg
@@ -0,0 +1,182 @@
+
+
diff --git a/build.gradle b/build.gradle
index c33b5646a..52b2a476b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -58,7 +58,7 @@ dependencies {
implementation 'androidx.viewpager:viewpager:1.0.0'
- playstoreImplementation('com.google.firebase:firebase-messaging:23.0.0') {
+ playstoreImplementation('com.google.firebase:firebase-messaging:23.0.2') {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png
new file mode 100644
index 000000000..b35467abe
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/icon.png differ
diff --git a/src/cheogram/java/com/cheogram/android/ConnectionService.java b/src/cheogram/java/com/cheogram/android/ConnectionService.java
index 13b3041da..8a68aadd2 100644
--- a/src/cheogram/java/com/cheogram/android/ConnectionService.java
+++ b/src/cheogram/java/com/cheogram/android/ConnectionService.java
@@ -99,7 +99,13 @@ public class ConnectionService extends android.telecom.ConnectionService {
String tel = PhoneNumberUtils.extractNetworkPortion(rawTel);
try {
tel = PhoneNumberUtilWrapper.normalize(this, tel);
- } catch (NumberParseException e) {
+ } catch (IllegalArgumentException | NumberParseException e) {
+ return Connection.createFailedConnection(
+ new DisconnectCause(DisconnectCause.ERROR)
+ );
+ }
+
+ if (xmppConnectionService == null) {
return Connection.createFailedConnection(
new DisconnectCause(DisconnectCause.ERROR)
);
@@ -112,6 +118,12 @@ public class ConnectionService extends android.telecom.ConnectionService {
}
Account account = xmppConnectionService.findAccountByJid(Jid.of(gateway[0]));
+ if (account == null) {
+ return Connection.createFailedConnection(
+ new DisconnectCause(DisconnectCause.ERROR)
+ );
+ }
+
Jid with = Jid.ofLocalAndDomain(tel, gateway[1]);
CheogramConnection connection = new CheogramConnection(account, with, postDial);
@@ -220,7 +232,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
if (sessionId == null || !sessionId.equals(this.sessionId)) return;
if (rtpConnection == null) {
this.with = with; // Store full JID of connection
- rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId);
+ findRtpConnection();
}
setStatusHints(new StatusHints(null, gatewayIcon, null));
@@ -231,10 +243,10 @@ public class ConnectionService extends android.telecom.ConnectionService {
setDialing();
} else if (state == RtpEndUserState.INCOMING_CALL) {
setRinging();
- } else if (state == RtpEndUserState.CONNECTED) {
+ } else if (state == RtpEndUserState.CONNECTING) {
xmppConnectionService.setDiallerIntegrationActive(true);
setActive();
-
+ } else if (state == RtpEndUserState.CONNECTED) {
postDial();
} else if (state == RtpEndUserState.DECLINED_OR_BUSY) {
close(new DisconnectCause(DisconnectCause.BUSY));
@@ -269,15 +281,20 @@ public class ConnectionService extends android.telecom.ConnectionService {
public void onAnswer() {
// For incoming calls, a connection update may not have been triggered before answering
// so we have to acquire the rtp connection object here
- this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId);
-
- rtpConnection.get().acceptCall();
+ findRtpConnection();
+ if (rtpConnection == null || rtpConnection.get() == null) {
+ close(new DisconnectCause(DisconnectCause.CANCELED));
+ } else {
+ rtpConnection.get().acceptCall();
+ }
}
@Override
public void onReject() {
- this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId);
- rtpConnection.get().rejectCall();
+ findRtpConnection();
+ if (rtpConnection != null && rtpConnection.get() != null) {
+ rtpConnection.get().rejectCall();
+ }
close(new DisconnectCause(DisconnectCause.LOCAL));
}
@@ -316,6 +333,12 @@ public class ConnectionService extends android.telecom.ConnectionService {
if (c) postDial();
}
+ protected void findRtpConnection() {
+ if (rtpConnection != null) return;
+
+ rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId);
+ }
+
protected void sleep(int ms) {
try {
Thread.sleep(ms);
diff --git a/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java b/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java
index 3419d8fc9..6f0386672 100644
--- a/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java
+++ b/src/cheogram/java/eu/siacs/conversations/ui/MagicCreateActivity.java
@@ -66,13 +66,11 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
if (username != null && domain != null) {
binding.title.setText(R.string.your_server_invitation);
binding.instructions.setText(getString(R.string.magic_create_text_fixed, domain));
- binding.finePrint.setVisibility(View.INVISIBLE);
binding.username.setEnabled(false);
binding.username.setText(this.username);
updateFullJidInformation(this.username);
} else if (domain != null) {
binding.instructions.setText(getString(R.string.magic_create_text_on_x, domain));
- binding.finePrint.setVisibility(View.INVISIBLE);
}
binding.createAccount.setOnClickListener(v -> {
try {
diff --git a/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java
index 0fc4757cd..3d08ac4bd 100644
--- a/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/cheogram/java/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -3,6 +3,7 @@ package eu.siacs.conversations.ui;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent;
+import android.os.Build;
import android.os.Bundle;
import android.security.KeyChain;
import android.security.KeyChainAliasCallback;
@@ -86,6 +87,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
startActivity(new Intent(android.telecom.TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS));
});
+ if (Build.VERSION.SDK_INT < 23) return;
+
outer:
for (Account account : xmppConnectionService.getAccounts()) {
for (Contact contact : account.getRoster().getContacts()) {
diff --git a/src/cheogram/res/layout/activity_pick_server.xml b/src/cheogram/res/layout/activity_pick_server.xml
index 16be52ec4..d55ea78cc 100644
--- a/src/cheogram/res/layout/activity_pick_server.xml
+++ b/src/cheogram/res/layout/activity_pick_server.xml
@@ -84,18 +84,6 @@
android:padding="8dp"
android:src="@drawable/main_logo" />
-
-
diff --git a/src/cheogram/res/layout/magic_create.xml b/src/cheogram/res/layout/magic_create.xml
index cc0337062..f6e0436a5 100644
--- a/src/cheogram/res/layout/magic_create.xml
+++ b/src/cheogram/res/layout/magic_create.xml
@@ -95,19 +95,6 @@
android:padding="8dp"
android:src="@drawable/main_logo" />
-
-
diff --git a/src/cheogram/res/values/themes.xml b/src/cheogram/res/values/themes.xml
index 052fd01d3..1eac1a82c 100644
--- a/src/cheogram/res/values/themes.xml
+++ b/src/cheogram/res/values/themes.xml
@@ -304,6 +304,22 @@
+
+
+
+
+
+