فهرست منبع

Cherry-pick FDL fix to 8.9.0 (#8867)

Co-authored-by: Eldhose M Babu <eldhosembabu@google.com>
Paul Beusterien 4 سال پیش
والد
کامیت
2064534407

+ 3 - 1
FirebaseDynamicLinks/CHANGELOG.md

@@ -1,6 +1,8 @@
 # v8.9.0
 - [fixed] Fixed Shortlink regression involving underscores and dashes introduced in 8.8.0. (#8786)
-- [fixed] Reduce memory stress on `WebKit` API. #8847
+- [fixed] Reduce memory stress on `WebKit` API. (#8847)
+- [fixed] Fixed regression introduced in 8.8.0 that failed to accept link query params after the
+  FDL domain prefix. It caused the Dynamic Links Quick Start to fail. (#8866)
 
 # v8.8.0
 - [fixed] Firebase dynamic links with custom domain will only work if the custom domain has a trailing '/'. (#7087)

+ 1 - 1
FirebaseDynamicLinks/Sources/Utilities/FDLUtilities.m

@@ -248,7 +248,7 @@ BOOL FIRDLIsAValidDLWithFDLDomain(NSURL *_Nullable URL) {
     // Matches the *.page.link and *.app.goo.gl domains.
     matchesRegularExpression =
         ([urlStr rangeOfString:@"^https?://[a-zA-Z0-9]+((\\.app\\.goo\\.gl)|(\\.page\\.link))((\\/"
-                               @"?\\?link=https?.*)|(\\/[a-zA-Z0-9-_]+)((\\/?\\?.*=.*)?$|$))"
+                               @"?\\?.*link=https?.*)|(\\/[a-zA-Z0-9-_]+)((\\/?\\?.*=.*)?$|$))"
                        options:NSRegularExpressionSearch]
              .location != NSNotFound);
 

+ 3 - 1
FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m

@@ -1378,7 +1378,9 @@ static NSString *const kInfoPlistCustomDomainsKey = @"FirebaseDynamicLinksCustom
   NSArray<NSString *> *urlStrings = @[
     @"https://some.page.link/test", @"https://some.page.link/test-test",
     @"https://some.page.link/test_test", @"https://some.page.link/test_test-test",
-    @"https://some.app.goo.gl/test_test-test"
+    @"https://some.app.goo.gl/test_test-test",
+    @"https://n8r9f.app.goo.gl/?ibi=com%2Egoogle%2EGCMTestApp%2Edev&amv=0&imv=1%2E0&link=https%3A%2F%2Fwww%2Egoogle%2Ecom",
+    @"https://n8r9f.app.goo.gl/?link=https%3A%2F%2Fwww%2Egoogle%2Ecom&ibi=com%2Egoogle%2EGCMTestApp%2Edev&amv=0&imv=1%2E0"
   ];
 
   for (NSString *urlString in urlStrings) {