diff --git a/ChangeLog b/ChangeLog index 42c0b7b..add3cc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-28 Riccardo Mottola + + * DBSoap.m + * DBSoap.h + Remove http support, no longer supported by salesforce.com + 2020-05-29 Riccardo Mottola * DBSoap.m diff --git a/DBSoap.h b/DBSoap.h index 962a8ca..8c70bdd 100644 --- a/DBSoap.h +++ b/DBSoap.h @@ -1,7 +1,7 @@ /* Project: DataBasin - Copyright (C) 2008-2019 Free Software Foundation + Copyright (C) 2008-2020 Free Software Foundation Author: Riccardo Mottola @@ -101,7 +101,7 @@ + (NSURL *)loginURLTest; + (GWSService *)gwserviceForDBSoap; -- (void)login :(NSURL *)url :(NSString *)userName :(NSString *)password :(BOOL)useHttps; +- (void)login :(NSURL *)url :(NSString *)userName :(NSString *)password; - (void)setLogger: (id)l; - (id)logger; - (unsigned)upBatchSize; diff --git a/DBSoap.m b/DBSoap.m index 30c8856..9516a9a 100644 --- a/DBSoap.m +++ b/DBSoap.m @@ -334,7 +334,7 @@ - (void)setMaxSOQLLength:(unsigned)size maxSOQLLength = MAX_SOQL_LENGTH; } -- (void)_login :(NSURL *)url :(NSString *)userName :(NSString *)password :(BOOL)useHttps +- (void)_login :(NSURL *)url :(NSString *)userName :(NSString *)password { NSUserDefaults *defs; NSMutableArray *orderArray; @@ -360,14 +360,6 @@ - (void)_login :(NSURL *)url :(NSString *)userName :(NSString *)password :(BOOL) /* init our service */ service = [[DBSoap gwserviceForDBSoap] retain]; - if (!useHttps && [[url scheme] isEqualTo:@"https"]) - { - if (!useHttps) - url = [[NSURL alloc] initWithScheme:@"http" host:[url host] path:[url path]]; - else - url = [[NSURL alloc] initWithScheme:@"https" host:[url host] path:[url path]]; - [url autorelease]; - } [service setURL:url]; //[service setDebug:YES]; @@ -443,15 +435,6 @@ - (void)_login :(NSURL *)url :(NSString *)userName :(NSString *)password :(BOOL) [userInfo setValue:[userInfoResult objectForKey:@"userFullName"] forKey:@"userFullName"]; [userInfo setValue:[userInfoResult objectForKey:@"userName"] forKey:@"userName"]; - - /* since Salesforce seems to be stubborn and returns an https connection - even if we initiate a non-secure one, we force it to http */ - if ([[gottenURL scheme] isEqualToString:@"https"] && !useHttps) - { - [logger log: LogInformative: @"[DBSoap Login]: preferences set to http, forcing....\n"]; - gottenURL = [[NSURL alloc] initWithScheme:@"http" host:[gottenURL host] path:[gottenURL path]]; - [gottenURL autorelease]; - } [self setServerURL:gottenURL]; if (sessionId == nil) @@ -1293,17 +1276,16 @@ - (void)dealloc /**

executes login

url specifies the URL of the endpoint

-

useHttps specifies if secure connecton has to be used or not. If not, http is attempted and then enforced. - The Salesforce.com instance must be configured to accept non-secure connections.

+

salesforce.com removed HTTP support since Spring '20, so HTTPS is mandatory

*/ -- (void)login :(NSURL *)url :(NSString *)userName :(NSString *)password :(BOOL)useHttps +- (void)login :(NSURL *)url :(NSString *)userName :(NSString *)password { [lockBusy lock]; busyCount++; [lockBusy unlock]; NS_DURING - [self _login :url :userName :password :useHttps]; + [self _login :url :userName :password]; NS_HANDLER { [lockBusy lock];