Skip to content

Commit

Permalink
Merge pull request #1841 from matrix-org/release/0.27.5/release
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Jan 9, 2024
2 parents dbec252 + d2bbd1a commit 08fcf6f
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 41 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## Changes in 0.27.5 (2024-01-09)

🐛 Bugfixes

- Update regex for email address to be aligned email format in RFC 5322 ([#1826](https://github.com/matrix-org/matrix-ios-sdk/pull/1826))

🧱 Build

- Update CocoaPods and other gems. ([#1835](https://github.com/matrix-org/matrix-ios-sdk/pull/1835))


## Changes in 0.27.4 (2023-11-28)

🐛 Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods", '~>1.13.0'
gem "cocoapods", '~>1.14.3'
gem "xcode-install"
gem "slather"
81 changes: 44 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
Expand All @@ -15,31 +20,33 @@ GEM
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.828.0)
aws-sdk-core (3.183.1)
aws-eventstream (1.3.0)
aws-partitions (1.859.0)
aws-sdk-core (3.188.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (1.73.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.136.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-s3 (1.140.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.6.0)
aws-sigv4 (1.7.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
bigdecimal (3.1.4)
claide (1.1.0)
clamp (1.3.2)
cocoapods (1.13.0)
cocoapods (1.14.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.13.0)
cocoapods-core (= 1.14.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -52,7 +59,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.13.0)
cocoapods-core (1.14.3)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -63,7 +70,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -76,17 +83,19 @@ GEM
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20231109)
dotenv (2.8.1)
drb (2.2.0)
ruby2_keywords
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.103.0)
excon (0.104.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -116,7 +125,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.7)
fastlane (2.216.0)
fastlane (2.217.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -156,13 +165,13 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
ffi (1.16.2)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.50.0)
google-apis-androidpublisher_v3 (0.53.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.1)
google-apis-core (0.11.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -175,19 +184,19 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-apis-storage_v1 (0.29.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0)
google-cloud-storage (1.45.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-apis-storage_v1 (~> 0.29.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
Expand All @@ -208,24 +217,25 @@ GEM
jwt (2.7.1)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
mini_portile2 (2.8.5)
minitest (5.20.0)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.3.0)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
nokogiri (1.15.4)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
optparse (0.1.1)
os (1.1.4)
plist (3.7.0)
public_suffix (4.0.7)
racc (1.7.1)
rake (13.0.6)
racc (1.7.3)
rake (13.1.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand All @@ -245,11 +255,11 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
slather (2.7.4)
slather (2.8.0)
CFPropertyList (>= 2.2, < 4)
activesupport
clamp (~> 1.3)
nokogiri (>= 1.13.9)
nokogiri (>= 1.14.3)
xcodeproj (~> 1.21)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
Expand All @@ -259,15 +269,12 @@ GEM
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcode-install (2.8.1)
Expand All @@ -289,7 +296,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.13.0)
cocoapods (~> 1.14.3)
fastlane
slather
xcode-install
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MatrixSDK"
s.version = "0.27.4"
s.version = "0.27.5"
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/MatrixSDKVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

#import <Foundation/Foundation.h>

NSString *const MatrixSDKVersion = @"0.27.4";
NSString *const MatrixSDKVersion = @"0.27.5";
2 changes: 1 addition & 1 deletion MatrixSDK/Utils/MXTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#warning File has not been annotated with nullability, see MX_ASSUME_MISSING_NULLABILITY_BEGIN

#pragma mark - Constant definition
NSString *const kMXToolsRegexStringForEmailAddress = @"[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}";
NSString *const kMXToolsRegexStringForEmailAddress = @"^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^-]+(?:\\.[a-zA-Z0-9_!#$%&'*+/=?`{|}~^-]+)*@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$";

// The HS domain part in Matrix identifiers
#define MATRIX_HOMESERVER_DOMAIN_REGEX @"[A-Z0-9]+((\\.|\\-)[A-Z0-9]+){0,}(:[0-9]{2,5})?"
Expand Down
52 changes: 52 additions & 0 deletions MatrixSDKTests/MXToolsUnitTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,58 @@ - (void)testMatrixIdentifiers
XCTAssertTrue([MXTools isMatrixGroupIdentifier:@"+matrix:matrix.org"]);
}

- (void)testEmailAddresses
{
XCTAssertTrue([MXTools isEmailAddress:@"alice@matrix.org"]);
XCTAssertTrue([MXTools isEmailAddress:@"alice@matrix"]);
XCTAssertTrue([MXTools isEmailAddress:@"al-i_ce@matrix"]);
XCTAssertTrue([MXTools isEmailAddress:@"al+ice@matrix.org"]);
XCTAssertTrue([MXTools isEmailAddress:@"al=ice@matrix.org"]);
XCTAssertTrue([MXTools isEmailAddress:@"*@example.net"]);
XCTAssertTrue([MXTools isEmailAddress:@"fred&barny@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"---@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"foo-bar@example.net"]);
XCTAssertTrue([MXTools isEmailAddress:@"mailbox.sub1.sub2@this-domain"]);
XCTAssertTrue([MXTools isEmailAddress:@"prettyandsimple@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"very.common@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"disposable.style.email.with+symbol@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"other.email-with-dash@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"x@example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"example-indeed@strange-example.com"]);
XCTAssertTrue([MXTools isEmailAddress:@"admin@mailserver1"]);
XCTAssertTrue([MXTools isEmailAddress:@"#!$%&'*+-/=?^_`{}|~@example.org"]);
XCTAssertTrue([MXTools isEmailAddress:@"example@localhost"]);
XCTAssertTrue([MXTools isEmailAddress:@"example@s.solutions"]);
XCTAssertTrue([MXTools isEmailAddress:@"user@localserver"]);
XCTAssertTrue([MXTools isEmailAddress:@"user@tt"]);
XCTAssertTrue([MXTools isEmailAddress:@"xn--80ahgue5b@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq"]);
XCTAssertTrue([MXTools isEmailAddress:@"nothing@xn--fken-gra.no"]);

XCTAssertFalse([MXTools isEmailAddress:@"alice.matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"al ice@matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"al(ice@matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"alice@"]);
XCTAssertFalse([MXTools isEmailAddress:@"al\nice@matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"al@ice@matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"al@ice@.matrix.org"]);
XCTAssertFalse([MXTools isEmailAddress:@"Just a string"]);
XCTAssertFalse([MXTools isEmailAddress:@"string"]);
XCTAssertFalse([MXTools isEmailAddress:@"me@"]);
XCTAssertFalse([MXTools isEmailAddress:@"@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"me.@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@".me@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"me@example..com"]);
XCTAssertFalse([MXTools isEmailAddress:@"me\\@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"Abc.example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"A@b@c@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"a\"b(c)d,e:f;g<h>i[j\\k]l@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"just\"not\"right@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"this is\"not\\allowed@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"this\\ still\\\"not\\\\allowed@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"john..doe@example.com"]);
XCTAssertFalse([MXTools isEmailAddress:@"john.doe@example..com"]);
}


#pragma mark - Strings encoding

Expand Down

0 comments on commit 08fcf6f

Please sign in to comment.