Commit c5aea521 authored by Thomas Markiewicz's avatar Thomas Markiewicz

Fixed a bug that prevented users from logging in with a full @librem.one address

parent d2658ce0
Pipeline #5965 failed with stage
in 4 minutes and 15 seconds
CHANGES
=======
Version 0.1.1 released to App Store on 2019-04-13
-------------------------------------------------
* Fixed a bug that prevented users from logging in with a full @librem.one address
Version 0.1.0 released to App Store on 2019-04-10
-------------------------------------------------
* Initial release
......
......@@ -421,13 +421,6 @@
if (user.length)
{
#ifdef LIBREMONE
// This hack always forces logging in with username.
// This code assumes input validation allows only valid email addresses.
// The username and domain is extracted from the Librem One address.
// "homeserver" is set to the domain part of the Librem One address.
// "user" from text field is overwritten with just the username so that subsequent code
// returns the "user" parameters not the email parameters.
// parse out user@domain
NSArray *userDomain = [user componentsSeparatedByString:@"@"];
NSString *username = userDomain[0];
......@@ -437,6 +430,8 @@
// filter out magic domain
if( [domain isEqualToString:@"sandbox.librem.one"] ) {
targetDomain = @"https://talk.liberty.one";
} else if( [domain isEqualToString:@"librem.one"] ) {
targetDomain = @"https://chat.librem.one";
} else {
targetDomain = [NSString stringWithFormat:@"https://%@", domain];;
}
......@@ -456,9 +451,6 @@
NSLog(@"Loggin in with homeserver set from Librem One address: %@", restClient.homeserver);
}
// re-write user to be a non-email user
user = username;
#endif
// Check whether user login is an email or a username.
if ([MXTools isEmailAddress:user])
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>0.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>0.1.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>0.1.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment