diff --git a/CHANGES_BWI.md b/CHANGES_BWI.md
index a097f251b..75405dff3 100644
--- a/CHANGES_BWI.md
+++ b/CHANGES_BWI.md
@@ -1,3 +1,27 @@
+Changes in BWI project 2.24.0 (2025-02-17)
+===================================================
+
+Upstream merge ✨:
+
+Features ✨:
+- MESSENGER-6856 add link to the learning portal
+- MESSNEGER-6854 show happy birthday popup
+- MESSENGER-6879 add support for authenticated media
+- MESSENGER-6790 add handling of expired jwt
+
+Improvements 🙌:
+- MESSENGER-6777 use baseURL from wellknown for jwt handling
+
+Bugfix 🐛:
+
+Translations 🗣 :
+
+SDK API changes ⚠️:
+
+Build 🧱:
+
+Documentation 📄:
+
Changes in BWI project 2.23.1 (2025-01-08)
===================================================
diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig
index 8083f007a..64b1263d0 100644
--- a/Config/AppVersion.xcconfig
+++ b/Config/AppVersion.xcconfig
@@ -16,5 +16,5 @@
//
// Version
-MARKETING_VERSION = 2.23.1
+MARKETING_VERSION = 2.24.0
CURRENT_PROJECT_VERSION = 20220714163152
diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift
index 162c5a7c6..3182ef811 100644
--- a/Config/BWIBuildSettings.swift
+++ b/Config/BWIBuildSettings.swift
@@ -588,7 +588,7 @@ class BWIBuildSettings: NSObject {
var bwiEnableRegisterInfo = false
var bwiShowHappyBirthdayCampaign = false
- var bwiHappyBirthdayCampaignIdentifier: String = "2024"
+ var bwiHappyBirthdayCampaignIdentifier: String = "2025"
var bwiDisableSecuritySettingsUntrustedDevices = true
diff --git a/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift b/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift
index 559dd34fb..6346b79a5 100644
--- a/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift
+++ b/Config/BuM-Beta/BWIBuildSettings+BuM-Beta.swift
@@ -44,5 +44,6 @@ extension BWIBuildSettings {
avoidServerSelectionOnAppConfig = true
enableFeatureWYSIWYGByDefault = true
bwiEnableTokenizedLoginProtection = true
+ bwiShowHappyBirthdayCampaign = true
}
}
diff --git a/Config/BuM/BWIBuildSettings+BuM.swift b/Config/BuM/BWIBuildSettings+BuM.swift
index 63ce262b0..948097e95 100644
--- a/Config/BuM/BWIBuildSettings+BuM.swift
+++ b/Config/BuM/BWIBuildSettings+BuM.swift
@@ -32,6 +32,7 @@ extension BWIBuildSettings {
avoidServerSelectionOnAppConfig = true
enableFeatureWYSIWYGByDefault = true
bwiEnableTokenizedLoginProtection = true
+ bwiShowHappyBirthdayCampaign = true
}
}
diff --git a/Podfile b/Podfile
index 94d395d23..258ede628 100644
--- a/Podfile
+++ b/Podfile
@@ -43,7 +43,7 @@ when String # specific MatrixSDK released version
$matrixSDKVersionSpec = $matrixSDKVersion
end
-$matrixSDKVersionSpec = { :git => 'https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk', :tag => 'v2.23.1' }
+$matrixSDKVersionSpec = { :git => 'https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk', :tag => 'v2.24.0' }
########################################
@@ -56,7 +56,6 @@ end
def import_SwiftUI_pods
pod 'Introspect', '~> 0.1'
- pod 'DSBottomSheet', '~> 0.3'
pod 'ZXingObjC', '~> 3.6.9'
end
diff --git a/Podfile.lock b/Podfile.lock
index 672f3250b..5d72e351f 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -14,43 +14,48 @@ PODS:
- AFNetworking/Serialization (4.0.1)
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- - BlueCryptor (1.0.32)
- - BlueECC (1.2.5)
- - BlueRSA (1.0.200)
- Down (0.11.0)
- - DSBottomSheet (0.3.0)
- DSWaveformImage (6.1.1)
- - FLEX (5.22.10)
+ - DTCoreText (1.6.26):
+ - DTCoreText/Core (= 1.6.26)
+ - DTFoundation/Core (~> 1.7.5)
+ - DTFoundation/DTAnimatedGIF (~> 1.7.5)
+ - DTFoundation/DTHTMLParser (~> 1.7.5)
+ - DTFoundation/UIKit (~> 1.7.5)
+ - DTCoreText/Core (1.6.26):
+ - DTFoundation/Core (~> 1.7.5)
+ - DTFoundation/DTAnimatedGIF (~> 1.7.5)
+ - DTFoundation/DTHTMLParser (~> 1.7.5)
+ - DTFoundation/UIKit (~> 1.7.5)
+ - DTFoundation/Core (1.7.19)
+ - DTFoundation/DTAnimatedGIF (1.7.19)
+ - DTFoundation/DTHTMLParser (1.7.19):
+ - DTFoundation/Core
+ - DTFoundation/UIKit (1.7.19):
+ - DTFoundation/Core
+ - DTTJailbreakDetection (0.4.0)
- FlowCommoniOS (1.12.2)
- GBDeviceInfo (7.1.0):
- GBDeviceInfo/Core (= 7.1.0)
- GBDeviceInfo/Core (7.1.0)
- GZIP (1.3.2)
- Introspect (0.12.0)
- - JitsiMeetSDKLite (8.1.2-lite):
- - JitsiWebRTC (~> 111.0)
- - JitsiWebRTC (111.0.2)
- KeychainAccess (4.2.2)
- - KituraContracts (1.2.1):
- - LoggerAPI (~> 1.7)
- KTCenterFlowLayout (1.3.1)
- libbase58 (0.1.4)
- libPhoneNumber-iOS (0.9.15)
- - LoggerAPI (1.9.200):
- - Logging (~> 1.1)
- - Logging (1.4.0)
- - MatrixSDK (0.27.13):
- - MatrixSDK/Core (= 0.27.13)
- - MatrixSDK/Core (0.27.13):
+ - MatomoTracker (7.5.2):
+ - MatomoTracker/Core (= 7.5.2)
+ - MatomoTracker/Core (7.5.2)
+ - MatrixSDK (0.27.15):
+ - MatrixSDK/Core (= 0.27.15)
+ - MatrixSDK/Core (0.27.15):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.3.0)
- libbase58 (~> 0.1.4)
- MatrixSDKCrypto (= 0.4.3)
- Realm (= 10.27.0)
- SwiftyBeaver (= 1.9.5)
- - MatrixSDK/JingleCallStack (0.27.13):
- - JitsiMeetSDKLite (= 8.1.2-lite)
- - MatrixSDK/Core
- MatrixSDKCrypto (0.4.3)
- ReadMoreTextView (3.0.1)
- Realm (10.27.0):
@@ -61,19 +66,9 @@ PODS:
- Reusable/View (= 4.1.2)
- Reusable/Storyboard (4.1.2)
- Reusable/View (4.1.2)
- - Sentry (7.15.0):
- - Sentry/Core (= 7.15.0)
- - Sentry/Core (7.15.0)
- SideMenu (6.5.0)
- - SwiftBase32 (0.9.0)
- SwiftFormat/CLI (0.54.5)
- SwiftGen (6.6.3)
- - SwiftJWT (3.6.200):
- - BlueCryptor (~> 1.0)
- - BlueECC (~> 1.1)
- - BlueRSA (~> 1.0)
- - KituraContracts (~> 1.2)
- - LoggerAPI (~> 1.7)
- SwiftLint (0.57.0)
- SwiftyBeaver (1.9.5)
- UICollectionViewLeftAlignedLayout (1.0.2)
@@ -86,25 +81,22 @@ PODS:
DEPENDENCIES:
- Down (~> 0.11.0)
- - DSBottomSheet (~> 0.3)
- DSWaveformImage (~> 6.1.1)
- - FLEX (~> 5.22.10)
+ - DTCoreText (= 1.6.26)
+ - DTTJailbreakDetection (~> 0.4.0)
- FlowCommoniOS (~> 1.12.0)
- GBDeviceInfo (~> 7.1.0)
- Introspect (~> 0.1)
- KeychainAccess (~> 4.2.2)
- KTCenterFlowLayout (~> 1.3.1)
- libPhoneNumber-iOS (~> 0.9.13)
- - MatrixSDK (from `matrix-ios-sdk/MatrixSDK.podspec`)
- - MatrixSDK/JingleCallStack (from `matrix-ios-sdk/MatrixSDK.podspec`)
+ - MatomoTracker (~> 7.5.2)
+ - MatrixSDK (from `https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk`, tag `v2.23.1`)
- ReadMoreTextView (~> 3.0.1)
- Reusable (~> 4.1)
- - Sentry (~> 7.15.0)
- SideMenu (~> 6.5)
- - SwiftBase32 (~> 0.9.0)
- SwiftFormat/CLI
- SwiftGen
- - SwiftJWT (~> 3.6.200)
- SwiftLint
- UICollectionViewLeftAlignedLayout (~> 1.0.2)
- UICollectionViewRightAlignedLayout (~> 0.0.3)
@@ -113,40 +105,32 @@ DEPENDENCIES:
- ZXingObjC (~> 3.6.9)
SPEC REPOS:
- trunk:
+ https://github.com/CocoaPods/Specs.git:
- AFNetworking
- - BlueCryptor
- - BlueECC
- - BlueRSA
+ - DTCoreText
+ - DTFoundation
+ - DTTJailbreakDetection
+ - GZIP
+ - libbase58
+ - MatomoTracker
+ - MatrixSDKCrypto
+ - Realm
+ - SwiftyBeaver
+ trunk:
- Down
- - DSBottomSheet
- DSWaveformImage
- - FLEX
- FlowCommoniOS
- GBDeviceInfo
- - GZIP
- Introspect
- - JitsiMeetSDKLite
- - JitsiWebRTC
- KeychainAccess
- - KituraContracts
- KTCenterFlowLayout
- - libbase58
- libPhoneNumber-iOS
- - LoggerAPI
- - Logging
- - MatrixSDKCrypto
- ReadMoreTextView
- - Realm
- Reusable
- - Sentry
- SideMenu
- - SwiftBase32
- SwiftFormat
- SwiftGen
- - SwiftJWT
- SwiftLint
- - SwiftyBeaver
- UICollectionViewLeftAlignedLayout
- UICollectionViewRightAlignedLayout
- WeakDictionary
@@ -155,41 +139,38 @@ SPEC REPOS:
EXTERNAL SOURCES:
MatrixSDK:
- :path: matrix-ios-sdk/MatrixSDK.podspec
+ :git: https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk
+ :tag: v2.23.1
+
+CHECKOUT OPTIONS:
+ MatrixSDK:
+ :git: https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk
+ :tag: v2.23.1
SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
- BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24
- BlueECC: 0d18e93347d3ec6d41416de21c1ffa4d4cd3c2cc
- BlueRSA: dfeef51db96bcc4edec654956c1581adbda4e6a3
Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612
- DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a
DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce
- FLEX: f21ee4f498eed3f8a1eded66b21939fd3b7a22ce
+ DTCoreText: ec749e013f2e1f76de5e7c7634642e600a7467ce
+ DTFoundation: 76b624967cf5bcaae6bb057d622c536c36ef36d0
+ DTTJailbreakDetection: 5e356c5badc17995f65a83ed9483f787a0057b71
FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2
GBDeviceInfo: 5d62fa85bdcce3ed288d83c28789adf1173e4376
GZIP: 3c0abf794bfce8c7cb34ea05a1837752416c8868
Introspect: b66b675de8a85d9ef832f3a710d8e3c7db186884
- JitsiMeetSDKLite: 895213158cf62342069a10634a41d2f1c00057f7
- JitsiWebRTC: 80f62908fcf2a1160e0d14b584323fb6e6be630b
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
- KituraContracts: e845e60dc8627ad0a76fa55ef20a45451d8f830b
KTCenterFlowLayout: 6e02b50ab2bd865025ae82fe266ed13b6d9eaf97
- libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd
+ libbase58: 8abc2a53ac38cd37720c0acbc53ef3660e9016c2
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
- LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
- Logging: beeb016c9c80cf77042d62e83495816847ef108b
- MatrixSDK: b5756a518af19296b94e3ad9b6f16648f9eb17c3
+ MatomoTracker: 1d98ddc58322fd9d65e1a6886b8e41363047bd13
+ MatrixSDK: 12b379749b84ab5b3662042acb1914b9f9bb692b
MatrixSDKCrypto: 27bee960e0e8b3a3039f3f3e93dd2ec88299c77e
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
Realm: 9ca328bd7e700cc19703799785e37f77d1a130f2
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
- Sentry: 63ca44f5e0c8cea0ee5a07686b02e56104f41ef7
SideMenu: f583187d21c5b1dd04c72002be544b555a2627a2
- SwiftBase32: 9399c25a80666dc66b51e10076bf591e3bbb8f17
SwiftFormat: 543a7b1ab4a6ce2d88bd5616a17903446ca3dc5c
SwiftGen: 4993cbf71cbc4886f775e26f8d5c3a1188ec9f99
- SwiftJWT: 88c412708f58c169d431d344c87bc79a87c830ae
SwiftLint: eb47480d47c982481592c195c221d11013a679cc
SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
UICollectionViewLeftAlignedLayout: 830bf6fa5bab9f9b464f62e3384f9d2e00b3c0f6
@@ -198,6 +179,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
-PODFILE CHECKSUM: 484a1cdf04951cc82156f29de196efd76d3ad893
+PODFILE CHECKSUM: 8e9f350d7011b2bfcf0a200516b533a1717af7ea
COCOAPODS: 1.15.2
diff --git a/README.md b/README.md
index 560197cb5..9883e5c92 100644
--- a/README.md
+++ b/README.md
@@ -13,9 +13,9 @@ Wir freuen uns, dass Du Dich für den BundesMessenger interessierst.
Fangen wir mit dem Wichtigsten an. Hier findest Du die offizielle App für iOS:
-
-
-
+
+
+
Wenn Dir die App gefällt, lass gerne eine positive Bewertung da.
diff --git a/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/Contents.json b/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/Contents.json
index 8808d0834..b56f90c52 100644
--- a/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/Contents.json
+++ b/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/Contents.json
@@ -1,7 +1,7 @@
{
"images" : [
{
- "filename" : "web_dark.svg",
+ "filename" : "undraw_Birthday_cake_BwM.svg",
"idiom" : "universal"
}
],
diff --git a/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/undraw_Birthday_cake_BwM.svg b/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/undraw_Birthday_cake_BwM.svg
new file mode 100644
index 000000000..6e7859edb
--- /dev/null
+++ b/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/undraw_Birthday_cake_BwM.svg
@@ -0,0 +1,758 @@
+
+
+
+
+
+ image/svg+xml
+
+ Birthday cake
+
+
+
+
+
+ Birthday cake
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/web_dark.svg b/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/web_dark.svg
deleted file mode 100644
index a3e7bb135..000000000
--- a/Riot/Assets/Images.xcassets/BWI/birthday_cake.imageset/web_dark.svg
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Riot/Assets/de.lproj/Localizable.strings b/Riot/Assets/de.lproj/Localizable.strings
index c18980736..92832177a 100644
--- a/Riot/Assets/de.lproj/Localizable.strings
+++ b/Riot/Assets/de.lproj/Localizable.strings
@@ -120,7 +120,7 @@
//
/* BWI: Happy Birthday Campaign*/
"HAPPY_BIRTHDAY" = "🥳 HAPPY BIRTHDAY 🥳";
-"HAPPY_BIRTHDAY_BODY" = "Danke für Deine Treue - jetzt und in Zukunft. Gratuliere dem BwMessenger zum 4. Geburtstag und schenke uns deine Sternebewertung im App Store.";
+"HAPPY_BIRTHDAY_BODY" = "Wir feiern 1 Jahr BundesMessenger. Möchtest du uns auch gratulieren? Schenke dem BundesMessenger deine Sterne Bewertung im App Store.";
"HAPPY_BIRTHDAY_BUTTON_GIVE_STARS" = "Sterne schenken";
"HAPPY_BIRTHDAY_BUTTON_DISMISS" = "X";
diff --git a/Riot/Assets/en.lproj/Localizable.strings b/Riot/Assets/en.lproj/Localizable.strings
index a1f178927..03f2039c1 100644
--- a/Riot/Assets/en.lproj/Localizable.strings
+++ b/Riot/Assets/en.lproj/Localizable.strings
@@ -187,6 +187,6 @@
/* BWI: Happy Birthday Campaign*/
"HAPPY_BIRTHDAY" = "🥳 HAPPY BIRTHDAY 🥳";
-"HAPPY_BIRTHDAY_BODY" = "Thank you for your loyalty - now and in the future. Congratulate BwMessenger on its 4th anniversary and give us your star rating on the App Store.";
-"HAPPY_BIRTHDAY_BUTTON_GIVE_STARS" = "Give Stars";
+"HAPPY_BIRTHDAY_BODY" = "We are celebrating 1 year of BundesMessenger. Don't you want to congratulate us too? Donate your star rating to BundesMessenger in the App Store.";
+"HAPPY_BIRTHDAY_BUTTON_GIVE_STARS" = "Donate stars";
"HAPPY_BIRTHDAY_BUTTON_DISMISS" = "X";
diff --git a/Riot/Assets/new_features.html b/Riot/Assets/new_features.html
index 608e9ac85..7f4523f96 100644
--- a/Riot/Assets/new_features.html
+++ b/Riot/Assets/new_features.html
@@ -26,6 +26,18 @@
+
+
+ Version 2.24.0
+
+
+
Verbesserungen
+
+ Hilfreiche Tipps zum BundesMessenger findest du jetzt unter: Einstellungen > Support > BundesMessenger Dokumentation.
+ Sicherheitsfunktionen wurden verbessert.
+
+
+
Version 2.23.1
diff --git a/Riot/Assets/support.html b/Riot/Assets/support.html
index f13bd1137..c1302bc14 100755
--- a/Riot/Assets/support.html
+++ b/Riot/Assets/support.html
@@ -37,6 +37,13 @@ Du suchst Hilfe bei der Bedienung von BundesMessenger, hast ein Problem oder ben
Hierzu gibt es folgende Möglichkeiten:
+
+ BundesMessenger Dokumentation
+
+ Hilfreiche Tipps findest du unter: Willkommen beim BundesMessenger 🚀 BundesMessenger Dokumentation
+
+
+
FAQs
diff --git a/Riot/Modules/Application/LegacyAppDelegate.h b/Riot/Modules/Application/LegacyAppDelegate.h
index 6182062a5..5f3d079bd 100644
--- a/Riot/Modules/Application/LegacyAppDelegate.h
+++ b/Riot/Modules/Application/LegacyAppDelegate.h
@@ -72,6 +72,10 @@ UINavigationControllerDelegate
@property (strong, nonatomic) UIAlertController *errorNotification;
+// BWI: #6790
+@property (strong, nonatomic) UIAlertController *serverNotAllowedAlertController;
+// BWI #6790 END
+
@property (strong, nonatomic) NSString *appVersion;
@property (strong, nonatomic) NSString *build;
diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m
index b66144ccb..8da0fe9d3 100644
--- a/Riot/Modules/Application/LegacyAppDelegate.m
+++ b/Riot/Modules/Application/LegacyAppDelegate.m
@@ -505,6 +505,18 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
[self setupAppConfig];
+ // BWI: #6790 check if active session is available
+ if ([self.mxSessions count] > 0)
+ {
+ // Check url savety for homeserver url
+ NSString *homeServerURL = [[[self.mxSessions firstObject] matrixRestClient] homeserver];
+ if (homeServerURL)
+ {
+ [self checkUrlSavetyWithURL: homeServerURL];
+ }
+ }
+ // BWI #6790 END
+
return YES;
}
@@ -533,6 +545,14 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
self.errorNotification = nil;
}
+ // BWI: #6790
+ if (self.serverNotAllowedAlertController)
+ {
+ [self.serverNotAllowedAlertController dismissViewControllerAnimated:NO completion:nil];
+ self.serverNotAllowedAlertController = nil;
+ }
+ // BWI #6790 END
+
if (accountPicker)
{
[accountPicker dismissViewControllerAnimated:NO completion:nil];
@@ -4342,6 +4362,60 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
}
}
+#pragma mark - App login protection
+// BWI: #6790 Check url savety for homeserver url on app start
+- (void)checkUrlSavetyWithURL:(NSString *)serverURL {
+ if (BWIBuildSettings.shared.bwiEnableLoginProtection || BWIBuildSettings.shared.bwiEnableTokenizedLoginProtection) {
+ LoginProtectionService *protectionService = [LoginProtectionService new];
+ protectionService.hashes = BWIBuildSettings.shared.bwiHashes;
+
+ MXWeakify(self);
+ [protectionService isValid:serverURL ignoreNetworkConnectionLost:YES completionHandler:^(BOOL isVaild) {
+ if (!isVaild) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ MXStrongifyAndReturnIfNil(self);
+
+ if (self.setPinCoordinatorBridgePresenter)
+ {
+ [self.setPinCoordinatorBridgePresenter dismissWithMainAppWindow:self.window];
+ self.setPinCoordinatorBridgePresenter = nil;
+ }
+
+ // Force logout
+ [self logoutWithConfirmation:NO completion:^(BOOL isLoggedOut) {
+ if (isLoggedOut)
+ {
+ // Show error Alert
+ [self->_serverNotAllowedAlertController dismissViewControllerAnimated:NO completion:nil];
+
+ self->_serverNotAllowedAlertController = [UIAlertController alertControllerWithTitle:[BWIL10n authenticationServerSelectionServerDeniedTitle] message:[BWIL10n authenticationServerSelectionServerDeniedMessage] preferredStyle:UIAlertControllerStyleAlert];
+
+ // Open bum advertizementURL
+ [self->_serverNotAllowedAlertController addAction:[UIAlertAction actionWithTitle:[BWIL10n authenticationServerSelectionServerDeniedAdvertizementWebsiteButton]
+ style:UIAlertActionStyleDefault
+ handler:^(UIAlertAction * action) {
+ NSURL *url = [[NSURL alloc] initWithString:BWIBuildSettings.shared.bumAdvertizementURLString];
+ [[UIApplication sharedApplication] vc_open:url completionHandler:nil];
+ }]];
+
+ // Close dialog
+ [self->_serverNotAllowedAlertController addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
+ style:UIAlertActionStyleDefault
+ handler:^(UIAlertAction * action) {
+ [AppDelegate theDelegate].errorNotification = nil;
+ }]];
+
+ [self->_serverNotAllowedAlertController mxk_setAccessibilityIdentifier:@"AppDelegateErrorAlertServerVerificationFailed"];
+ [self showNotificationAlert:self->_serverNotAllowedAlertController];
+ }
+ }];
+ });
+ }
+ }];
+ }
+}
+// BWI #6790 END
+
#pragma mark - App version management
- (void)checkAppVersion
diff --git a/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationService.swift b/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationService.swift
index eba26e886..99e7d56a9 100644
--- a/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationService.swift
+++ b/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationService.swift
@@ -205,6 +205,20 @@ class AuthenticationService: NSObject {
delegate?.authenticationService(self, didReceive: token, with: transactionID) ?? false
}
+ /// BWI: #6777 use baseURL for JWT handling
+ func getBaseURL(_ homeserverAddress: String) async -> String? {
+ guard let homeserverURL = URL(string: homeserverAddress) else {
+ return nil
+ }
+
+ guard let wellKnown = try? await wellKnown(for: homeserverURL) else {
+ return nil
+ }
+
+ return wellKnown.homeServer.baseUrl
+ }
+ /// BWI END
+
// MARK: - Private
/// Query the supported login flows for the supplied homeserver.
diff --git a/RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift b/RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift
index e38360983..9c223be90 100644
--- a/RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift
+++ b/RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift
@@ -62,6 +62,11 @@ struct AuthenticationServerSelectionBindings {
var homeserverAddress: String
/// Information describing the currently displayed alert.
var alertInfo: AlertInfo?
+ /// BWI: #6777 Show error alerts
+ var showAlert = false
+ /// BWI: #6777 show info alert if the server is not supported
+ var isInvalidServerAlert = false
+ /// BWI END
}
enum AuthenticationServerSelectionViewAction {
diff --git a/RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift b/RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift
index c5f15ecbb..81c109721 100644
--- a/RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift
+++ b/RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift
@@ -32,6 +32,9 @@ final class AuthenticationServerSelectionCoordinator: Coordinator, Presentable {
private var indicatorPresenter: UserIndicatorTypePresenterProtocol
private var loadingIndicator: UserIndicator?
+ // BWI: #6777 for accessing bindings
+ private let viewModel: AuthenticationServerSelectionViewModel
+ // BWI END
/// The authentication service that will be updated with the new selection.
var authenticationService: AuthenticationService { parameters.authenticationService }
@@ -54,9 +57,11 @@ final class AuthenticationServerSelectionCoordinator: Coordinator, Presentable {
} else {
homeserverAddress = homeserver.displayableAddress
}
- let viewModel = AuthenticationServerSelectionViewModel(homeserverAddress: homeserverAddress,
+ // BWI: #6777 for accessing bindings
+ viewModel = AuthenticationServerSelectionViewModel(homeserverAddress: homeserverAddress,
flow: parameters.authenticationService.state.flow,
hasModalPresentation: parameters.hasModalPresentation)
+ // BWI END
let view = AuthenticationServerSelectionScreen(viewModel: viewModel.context)
authenticationServerSelectionViewModel = viewModel
authenticationServerSelectionHostingController = VectorHostingController(rootView: view)
@@ -87,7 +92,9 @@ final class AuthenticationServerSelectionCoordinator: Coordinator, Presentable {
switch result {
case .confirm(let homeserverAddress):
- self.useHomeserver(homeserverAddress)
+ // BWI: #6777 check wellknown for base url, validate url with jwt and use homeserver
+ self.validateServer(homeserverAddress)
+ // BWI END
case .dismiss:
self.callback?(.dismiss)
}
@@ -132,4 +139,37 @@ final class AuthenticationServerSelectionCoordinator: Coordinator, Presentable {
}
}
}
+
+ // MARK: BWI
+
+ /// BWI: #6777 use baseURL for JWT handling
+ /// Use baseURL from Wellknown to vaildate server with JWT
+ /// If valid use homeserver
+ @MainActor private func validateServer(_ homeServerAddress: String) {
+ // bwi #6162 homeserver validation is async now, due to server calls for token validation
+ Task {
+ let homeServerAddress = HomeserverAddress.sanitized(homeServerAddress)
+ let baseURL = await authenticationService.getBaseURL(homeServerAddress) ?? homeServerAddress
+
+ let verified = await isHomeserverAddressValid(baseURL)
+ if verified {
+ useHomeserver(baseURL)
+ } else {
+ viewModel.context.isInvalidServerAlert = true
+ viewModel.context.showAlert = true
+ }
+ }
+ }
+
+ private func isHomeserverAddressValid(_ homeserverAddress: String) async -> Bool {
+
+ if BWIBuildSettings.shared.bwiEnableLoginProtection || BWIBuildSettings.shared.bwiEnableTokenizedLoginProtection {
+ let protectionService = LoginProtectionService()
+ protectionService.hashes = BWIBuildSettings.shared.bwiHashes
+
+ return await protectionService.isValid(homeserverAddress)
+ }
+
+ return true
+ }
}
diff --git a/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift b/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift
index 7e69dff95..4e32b7a27 100644
--- a/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift
+++ b/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift
@@ -24,8 +24,6 @@ struct AuthenticationServerSelectionScreen: View {
// bwi #4976 show maintenance alert
@State private var isFetchingDowntime = false
- @State private var showAlert = false
- @State private var isInvalidServerAlert = false
@State private var activeAlert: ServerMaintenanceAlertType = .showInvalidAppVersionAlert
private var textFieldFooterColor: Color {
@@ -84,8 +82,8 @@ struct AuthenticationServerSelectionScreen: View {
}
}
}
- .alert(isPresented: $showAlert, content: {
- if isInvalidServerAlert {
+ .alert(isPresented: $viewModel.showAlert, content: {
+ if viewModel.isInvalidServerAlert {
return self.invalidServerAlert()
} else {
return ServerDowntimeDefaultService.shared.alert(alertType: activeAlert) {
@@ -202,30 +200,9 @@ struct AuthenticationServerSelectionScreen: View {
/// Sends the `confirm` view action so long as the text field input is valid.
private func submit() {
guard !viewModel.viewState.hasValidationError else { return }
-
- // bwi #6162 homeserver validation is async now, due to server calls for token validation
- Task {
- let verified = await isHomeserverAddressValid(viewModel.homeserverAddress)
- if verified {
- viewModel.send(viewAction: .confirm)
- } else {
- isInvalidServerAlert = true
- showAlert = true
- }
- }
-
- }
-
- private func isHomeserverAddressValid(_ homeserverAddress: String) async -> Bool {
-
- if BWIBuildSettings.shared.bwiEnableLoginProtection || BWIBuildSettings.shared.bwiEnableTokenizedLoginProtection {
- let protectionService = LoginProtectionService()
- protectionService.hashes = BWIBuildSettings.shared.bwiHashes
-
- return await protectionService.isValid(homeserverAddress)
- }
-
- return true
+ // BWI: #6777 validate and use base url from wellknown
+ viewModel.send(viewAction: .confirm)
+ // BWI END
}
/// bwi: jump directly into the iOS settings app to allow camera access
@@ -259,14 +236,27 @@ struct AuthenticationServerSelectionScreen: View {
return Alert(
title: Text(BWIL10n.authenticationServerSelectionServerDeniedTitle),
message: Text(BWIL10n.authenticationServerSelectionServerDeniedMessage),
- primaryButton: .default(Text(BWIL10n.authenticationServerSelectionServerDeniedAdvertizementWebsiteButton), action: {UIApplication.shared.vc_open(url, completionHandler: nil)}),
- secondaryButton: .default(Text(VectorL10n.ok)))
+ primaryButton: .default(Text(BWIL10n.authenticationServerSelectionServerDeniedAdvertizementWebsiteButton), action: {
+ // BWI: #6777 reset isInvalidServerAlert on dismiss, otherwise server downtime errors are not displayed
+ viewModel.isInvalidServerAlert = false
+ // BWI END
+ UIApplication.shared.vc_open(url, completionHandler: nil)
+ }),
+ secondaryButton: .default(Text(VectorL10n.ok), action: {
+ // BWI: #6777 reset isInvalidServerAlert on dismiss, otherwise server downtime errors are not displayed
+ viewModel.isInvalidServerAlert = false
+ // BWI END
+ }))
} else {
return Alert(
title: Text(BWIL10n.authenticationServerSelectionServerDeniedTitle),
message: Text(BWIL10n.authenticationServerSelectionServerDeniedMessage),
- dismissButton: .default(Text(VectorL10n.ok)))
+ dismissButton: .default(Text(VectorL10n.ok), action: {
+ // BWI: #6777 reset isInvalidServerAlert on dismiss, otherwise server downtime errors are not displayed
+ viewModel.isInvalidServerAlert = false
+ // BWI END
+ }))
}
}
@@ -302,7 +292,9 @@ struct AuthenticationServerSelectionScreen: View {
private func showAlertIfNeeded() {
if ServerDowntimeDefaultService.shared.showAlert() {
activeAlert = ServerDowntimeDefaultService.shared.alertType()
- showAlert = true
+ // BWI: #6777 moved boolean to viewmodel bindings
+ viewModel.showAlert = true
+ // BWI END
} else {
self.submit()
}
diff --git a/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/View/LiveLocationSharingViewer.swift b/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/View/LiveLocationSharingViewer.swift
index 34ccb7fd5..dbbf8e79a 100644
--- a/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/View/LiveLocationSharingViewer.swift
+++ b/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/View/LiveLocationSharingViewer.swift
@@ -5,7 +5,6 @@
// Please see LICENSE in the repository root for full details.
//
-import DSBottomSheet
import SwiftUI
struct LiveLocationSharingViewer: View {
@@ -16,9 +15,7 @@ struct LiveLocationSharingViewer: View {
@Environment(\.theme) private var theme: ThemeSwiftUI
@Environment(\.openURL) var openURL
-
- @State private var isBottomSheetExpanded = false
-
+
var bottomSheetCollapsedHeight: CGFloat = 150.0
// MARK: Public
@@ -114,7 +111,19 @@ struct LiveLocationSharingViewer: View {
}
.accentColor(theme.colors.accent)
.background(theme.colors.system.ignoresSafeArea())
- .bottomSheet(sheet, if: viewModel.viewState.isBottomSheetVisible)
+ .sheet(isPresented: .constant(viewModel.viewState.isBottomSheetVisible)) {
+ if #available(iOS 16.4, *) {
+ userLocationList
+ .presentationBackgroundInteraction(.enabled)
+ .presentationBackground(theme.colors.background)
+ .presentationDragIndicator(.visible)
+ .presentationDetents([.height(bottomSheetCollapsedHeight), .large])
+ .interactiveDismissDisabled()
+ } else {
+ userLocationList
+ .interactiveDismissDisabled()
+ }
+ }
.actionSheet(isPresented: $viewModel.showMapCreditsSheet) {
MapCreditsActionSheet(
attribution: LocationSharingAttribution(),
@@ -135,8 +144,6 @@ struct LiveLocationSharingViewer: View {
LiveLocationListItem(viewData: viewData, onStopSharingAction: {
viewModel.send(viewAction: .stopSharing)
}, onBackgroundTap: { userId in
- // Push bottom sheet down on item tap
- isBottomSheetExpanded = false
viewModel.send(viewAction: .tapListItem(userId))
})
}
@@ -147,34 +154,6 @@ struct LiveLocationSharingViewer: View {
}
}
-// MARK: - Bottom sheet
-
-extension LiveLocationSharingViewer {
- var sheetStyle: BottomSheetStyle {
- var bottomSheetStyle = BottomSheetStyle.standard
-
- bottomSheetStyle.snapRatio = 0.16
-
- let backgroundColor = theme.colors.background
-
- let handleStyle = BottomSheetHandleStyle(backgroundColor: backgroundColor, dividerColor: backgroundColor)
- bottomSheetStyle.handleStyle = handleStyle
-
- return bottomSheetStyle
- }
-
- var sheet: some BottomSheetView {
- BottomSheet(
- isExpanded: $isBottomSheetExpanded,
- minHeight: .points(bottomSheetCollapsedHeight),
- maxHeight: .available,
- style: sheetStyle
- ) {
- userLocationList
- }
- }
-}
-
// MARK: - Previews
struct LiveLocationSharingViewer_Previews: PreviewProvider {
diff --git a/bwi/AppConfig/AppConfigService.swift b/bwi/AppConfig/AppConfigService.swift
index 981fe208c..0ea41f62e 100644
--- a/bwi/AppConfig/AppConfigService.swift
+++ b/bwi/AppConfig/AppConfigService.swift
@@ -120,7 +120,7 @@ extension UserDefaults
func handleAppConfig() async {
if let dict = UserDefaults.standard.dictionary(forKey: configKey) {
- // only compute if serverURL has not changed (this may need to be changed on Adminportal integration
+ // only compute if serverURL has changed (this may need to be changed on Adminportal integration
if !isSameConfig(dict: dict) {
var config = AppConfig()
diff --git a/bwi/HappyBirthday/HappyBirthdayView.swift b/bwi/HappyBirthday/HappyBirthdayView.swift
index 0a48214be..4f4e604e3 100644
--- a/bwi/HappyBirthday/HappyBirthdayView.swift
+++ b/bwi/HappyBirthday/HappyBirthdayView.swift
@@ -66,7 +66,6 @@ struct HappyBirthdayBody: View {
VStack(spacing: 40) {
VStack {
Text("HAPPY_BIRTHDAY")
- Text("\(AppInfo.current.displayName)")
}
.font(.title)
.foregroundColor(Color(ThemeService.shared().theme.textPrimaryColor))
diff --git a/bwi/LoginProtection/LoginProtectionService.swift b/bwi/LoginProtection/LoginProtectionService.swift
index 7f9112ffa..3fb21d00e 100644
--- a/bwi/LoginProtection/LoginProtectionService.swift
+++ b/bwi/LoginProtection/LoginProtectionService.swift
@@ -21,7 +21,7 @@ import CryptoKit
@objcMembers class LoginProtectionService : NSObject {
var hashes: [String]?
- @objc func isValid(_ homeserverAddress: String) async -> Bool {
+ @objc func isValid(_ homeserverAddress: String, ignoreNetworkConnectionLost: Bool = false) async -> Bool {
// bwi #6162 a homeserveraddress is valid when there is either
// a) no homeserver protection (bwm)
// b) tokenized protection and there is a valid token
@@ -36,8 +36,12 @@ import CryptoKit
let tokens = await tokenVerificator.fetchToken(baseURL: homeserverAddress)
- if let tokens = tokens {
- validHomeserver = tokenVerificator.verifyToken(baseURL: homeserverAddress, tokens: tokens)
+ if tokens == nil && ignoreNetworkConnectionLost {
+ validHomeserver = true
+ } else {
+ if let tokens = tokens, !tokens.isEmpty {
+ validHomeserver = tokenVerificator.verifyToken(baseURL: homeserverAddress, tokens: tokens)
+ }
}
}
diff --git a/bwi/TokenVerification/TokenVerificator.swift b/bwi/TokenVerification/TokenVerificator.swift
index c16c91abe..05798ed2a 100644
--- a/bwi/TokenVerification/TokenVerificator.swift
+++ b/bwi/TokenVerification/TokenVerificator.swift
@@ -21,8 +21,8 @@ import SwiftJWT
struct ServerTokenClaims: Claims {
let issuer: String
let sub: String
- let exp: Int
- let iat: Int
+ let exp: Date?
+ let iat: Date?
let jti: String
let version: Int
}
@@ -80,8 +80,11 @@ struct ServerTokenVerificator {
let fetchedStrings = try JSONDecoder().decode([String].self, from: data)
return fetchedStrings
- } catch {
- return nil
+ } catch (let error) {
+ if let error = error as? URLError, error.code == .notConnectedToInternet {
+ return nil
+ }
+ return [String]()
}
}
diff --git a/publiccode.yml b/publiccode.yml
new file mode 100644
index 000000000..f018aacd3
--- /dev/null
+++ b/publiccode.yml
@@ -0,0 +1,69 @@
+publiccodeYmlVersion: "0.4"
+name: BundesMessenger
+applicationSuite: BundesMessenger
+url: https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
+platforms:
+ - ios
+categories:
+ - communications
+ - collaboration
+developmentStatus: stable
+softwareType: standalone/mobile
+intendedAudience:
+ countries:
+ - de
+ scope:
+ - government
+ - local-authorities
+description:
+ de:
+ genericName: BundesMessenger
+ shortDescription: Der BundesMessenger ist eine sichere Messaging-Lösung für die
+ Öffentliche Verwaltung.
+ longDescription: >
+ Der BundesMessenger ist eine sichere Messaging-Lösung für die Öffentliche
+ Verwaltung. Von der BWI für die Behörden in Deutschland.
+
+ Das Ziel ist es eine moderne & sichere Zusammenarbeitsplattform auf Basis
+ von Open Source für Deutschland zu schaffen, die sich den Bedürfnissen und
+ Vorgaben der Deutschen Verwaltung anpassen kann.
+
+ Mit dem BundesMessenger kannst Du auch beruflich so kommunizieren, wie Du
+ es privat von anderen Messengern gewohnt bist.
+
+ Der Messenger nutzt das Open-Source-Protokoll Matrix und wurde für
+ maximale Sicherheit konzipiert. Wenn Du schon andere Messengers verwendet
+ hast, findest Du Dich im BundesMessenger sofort zurecht!
+
+ Tausch Dich in 1:1-Chats oder in Diskussionsgruppen aus und versende
+ Textnachrichten, Dokumente oder Mediendateien - aber auch
+ Sprachnachrichten und Umfragen sind möglich. Jede Kommunikation wird
+ automatisch und durchgängig VERSCHLÜSSELT.
+ features:
+ - Messaging
+ - Kommunikation
+ - Ende-zu-Ende verschlüsselte Kommunikation für Text & Medien
+ - Direktnachrichten, offene und geschlossenen Gruppen
+ - Integriertes Adressbuch
+ - Abstimmungen (Poll)
+ - Sprachnachrichten
+legal:
+ license: AGPL-3.0-or-later
+ mainCopyrightOwner: BWI GmbH
+maintenance:
+ type: internal
+ contractors:
+ - name: BWI GmbH
+ until: 2025-12-31
+ email: bundesmessenger@bwi.de
+ website: https://messenger.bwi.de/
+ contacts:
+ - name: BWI GmbH
+ email: bundesmessenger@bwi.de
+ phone: ""
+ affiliation: ""
+localisation:
+ localisationReady: true
+ availableLanguages:
+ - de
+ - en