|
@@ -309,6 +309,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, 0, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, 0, nil, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
[communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
|
|
@@ -378,6 +380,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -421,6 +425,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, nil, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -478,6 +484,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *url = tableAccount.url;
|
|
@@ -588,6 +596,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *autoUploadFileName = [[NCManageDatabase sharedInstance] getAccountAutoUploadFileName];
|
|
@@ -658,6 +668,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *path = [NSString stringWithFormat:@"%@/%@", serverUrl, fileName];
|
|
@@ -720,6 +732,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -758,6 +772,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -813,6 +829,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *path = [tableAccount.url stringByAppendingString:k_dav];
|
|
@@ -954,6 +972,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *file = [NSString stringWithFormat:@"%@/%@.ico", [CCUtility getDirectoryProviderStorageFileID:metadata.fileID], metadata.fileNameView];
|
|
@@ -996,6 +1016,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1036,6 +1058,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *file = [NSString stringWithFormat:@"%@/%@.ico", [CCUtility getDirectoryProviderStorageFileID:fileID], fileName];
|
|
@@ -1089,6 +1113,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *autoUploadFileName = [[NCManageDatabase sharedInstance] getAccountAutoUploadFileName];
|
|
@@ -1177,6 +1203,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *server = [tableAccount.url stringByAppendingString:k_dav];
|
|
@@ -1221,6 +1249,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1260,6 +1290,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1301,6 +1333,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1340,6 +1374,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1379,6 +1415,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1418,6 +1456,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1457,6 +1497,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, 0, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, 0, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1502,6 +1544,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilitesWithAccount:account];
|
|
@@ -1545,6 +1589,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1584,6 +1630,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1623,6 +1671,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1662,6 +1712,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1701,6 +1753,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -1744,6 +1798,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, nil, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
devicePublicKey = [CCUtility URLEncodeStringFromString:devicePublicKey];
|
|
@@ -1819,6 +1875,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
|
|
@@ -1932,6 +1990,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *fileIDServer = [[NCUtility sharedInstance] convertFileIDClientToFileIDServer:fileID];
|
|
@@ -1972,6 +2032,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -2010,6 +2072,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -2048,6 +2112,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *fileNamePath = [CCUtility returnFileNamePathFromFileName:fileName serverUrl:serverUrl activeUrl:tableAccount.url];
|
|
@@ -2092,6 +2158,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
|
|
@@ -2172,6 +2240,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *path = [NSString stringWithFormat:@"%@%@/trashbin/%@/trash", tableAccount.url, k_dav, tableAccount.userID];
|
|
@@ -2216,6 +2286,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *serverPath = [NSString stringWithFormat:@"%@/ocs/v2.php/apps/handwerkcloud/api/v1/settings/%@", serverUrl, tableAccount.userID];
|
|
@@ -2257,6 +2329,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
// Create JSON
|
|
@@ -2325,6 +2399,8 @@
|
|
|
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
|
|
|
if (tableAccount == nil) {
|
|
|
completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
|
|
|
+ } else if ([CCUtility getPassword:account].length == 0) {
|
|
|
+ completion(account, nil, NSLocalizedString(@"_bad_username_password_", nil), kOCErrorServerUnauthorized);
|
|
|
}
|
|
|
|
|
|
NSString *serverPath = [NSString stringWithFormat:@"%@/ocs/v2.php/apps/handwerkcloud/api/v1/features/%@", serverUrl, tableAccount.userID];
|