@@ -1615,7 +1615,18 @@ - (void)testValidCustomDomainNames {
1615
1615
NSArray <NSString *> *longFDLURLStrings = @[
1616
1616
@" https://a.firebase.com/mypath/?link=https://abcd&test=1" , // Long FDL starting with
1617
1617
// https://a.firebase.com/mypath
1618
+ @" https://google.com?link=http://abcd" , // Long FDL starting with 'https://google.com'
1618
1619
@" https://google.com/?link=http://abcd" , // Long FDL starting with 'https://google.com'
1620
+ @" https://google.com?link=https://somedomain&some=qry" , // Long FDL with link param as another
1621
+ // argument.
1622
+ @" https://google.com/?link=https://somedomain&some=qry" , // Long FDL with link param as another
1623
+ // argument.
1624
+ @" https://google.com?some=qry&link=https://somedomain" , // Long FDL with link param as second
1625
+ // argument.
1626
+ @" https://google.com/?some=qry&link=https://somedomain" , // Long FDL with link param as second
1627
+ // argument
1628
+ @" https://google.com/?a=b&c=d&link=https://somedomain&y=z" , // Long FDL with link param as
1629
+ // middle argument argument
1619
1630
];
1620
1631
for (NSString *urlString in urlStrings) {
1621
1632
NSURL *url = [NSURL URLWithString: urlString];
@@ -1638,15 +1649,17 @@ - (void)testInvalidCustomDomainNames {
1638
1649
// https://a.firebase.com/mypath
1639
1650
1640
1651
NSArray <NSString *> *urlStrings = @[
1641
- @" google.com" , // Valid domain. No scheme.
1642
- @" https://google.com" , // Valid domain. No path after domainURIPrefix.
1643
- @" https://google.com/" , // Valid domain. No path after domainURIPrefix.
1644
- @" https://google.co.in/mylink" , // No matching domainURIPrefix.
1645
- @" https://firebase.com/mypath" , // No matching domainURIPrefix: Invalid (sub)domain.
1646
- @" https://b.firebase.com/mypath" , // No matching domainURIPrefix: Invalid subdomain.
1647
- @" https://a.firebase.com/mypathabc" , // No matching domainURIPrefix: Invalid subdomain.
1648
- @" mydomain.com" , // https scheme not specified for domainURIPrefix.
1649
- @" http://mydomain" , // Domain not in plist. No path after domainURIPrefix.
1652
+ @" google.com" , // Valid domain. No scheme.
1653
+ @" https://google.com" , // Valid domain. No path after domainURIPrefix.
1654
+ @" https://google.com/" , // Valid domain. No path after domainURIPrefix.
1655
+ @" https://google.co.in/mylink" , // No matching domainURIPrefix.
1656
+ @" https://google.com/?some=qry" , // Valid domain with no path and link param
1657
+ @" https://google.com/?some=qry&link=bla" , // Valid domain with no path and no valid link param
1658
+ @" https://firebase.com/mypath" , // No matching domainURIPrefix: Invalid (sub)domain.
1659
+ @" https://b.firebase.com/mypath" , // No matching domainURIPrefix: Invalid subdomain.
1660
+ @" https://a.firebase.com/mypathabc" , // No matching domainURIPrefix: Invalid subdomain.
1661
+ @" mydomain.com" , // https scheme not specified for domainURIPrefix.
1662
+ @" http://mydomain" , // Domain not in plist. No path after domainURIPrefix.
1650
1663
@" https://somecustom.com?" , @" https://somecustom.com/?" ,
1651
1664
@" https://somecustom.com?somekey=someval"
1652
1665
];
0 commit comments