Revision: 24001
http://sourceforge.net/p/bibdesk/svn/24001
Author: hofman
Date: 2019-07-12 09:25:01 +0000 (Fri, 12 Jul 2019)
Log Message:
-----------
fix authentication disposition constants
Modified Paths:
--------------
trunk/bibdesk/BDSKAuthenticationController.m
Modified: trunk/bibdesk/BDSKAuthenticationController.m
===================================================================
--- trunk/bibdesk/BDSKAuthenticationController.m 2019-07-12 06:30:49 UTC
(rev 24000)
+++ trunk/bibdesk/BDSKAuthenticationController.m 2019-07-12 09:25:01 UTC
(rev 24001)
@@ -112,7 +112,7 @@
[mainLabelField setStringValue:message];
[self adjustSizeOfTextField:mainLabelField];
- if ([space receivesCredentialSecurely])
+ if ([space receivesCredentialSecurely] || [[space protocol]
isCaseInsensitiveEqual:@"https"])
[smallLabelField setStringValue:
NSLocalizedString(@"Your login information will be sent securely.",
@"message in authentication panel")];
else
@@ -129,7 +129,7 @@
}
- (NSURLCredential *)credential {
- return [NSURLCredential credentialWithUser:[userField stringValue]
password:[passwordField stringValue] persistence:([rememberButton state] ==
NSOnState) ? NSURLCredentialPersistencePermanent :
NSURLCredentialPersistenceForSession];
+ return [NSURLCredential credentialWithUser:[userField stringValue] ?: @""
password:[passwordField stringValue] ?: @"" persistence:([rememberButton state]
== NSOnState) ? NSURLCredentialPersistencePermanent :
NSURLCredentialPersistenceForSession];
}
- (void)runAuthentication:(NSURLAuthenticationChallenge *)challenge
window:(NSWindow *)window completionHandler:(void
(^)(BDSKDownloaderAuthChallengeDisposition disposition, NSURLCredential
*credential))completionHandler {
@@ -139,17 +139,17 @@
usingSheet = YES;
[self beginSheetModalForWindow:window completionHandler:^(NSInteger
result){
if (result == NSOKButton)
-
completionHandler(BDSKDownloaderAuthChallengeCancelAuthenticationChallenge,
[self credential]);
+ completionHandler(BDSKDownloaderAuthChallengeUseCredential,
[self credential]);
else
-
completionHandler(BDSKDownloaderAuthChallengeCancelAuthenticationChallenge,
nil);
+
completionHandler(BDSKDownloaderAuthChallengePerformDefaultHandling, nil);
}];
} else {
usingSheet = NO;
[self retain];
if ([NSApp runModalForWindow:[self window]] == NSOKButton)
-
completionHandler(BDSKDownloaderAuthChallengeCancelAuthenticationChallenge,
[self credential]);
+ completionHandler(BDSKDownloaderAuthChallengeUseCredential, [self
credential]);
else
-
completionHandler(BDSKDownloaderAuthChallengeCancelAuthenticationChallenge,
nil);
+
completionHandler(BDSKDownloaderAuthChallengePerformDefaultHandling, nil);
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit