Author: rfm
Date: Wed Mar  9 15:50:40 2016
New Revision: 39502

URL: http://svn.gna.org/viewcvs/gnustep?rev=39502&view=rev
Log:
Fix use of authentication credential from URL by Sergei Golovin

Modified:
    libs/base/trunk/Source/NSFileManager.m
    libs/base/trunk/Source/NSURLConnection.m

Modified: libs/base/trunk/Source/NSFileManager.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSFileManager.m?rev=39502&r1=39501&r2=39502&view=diff
==============================================================================
--- libs/base/trunk/Source/NSFileManager.m      (original)
+++ libs/base/trunk/Source/NSFileManager.m      Wed Mar  9 15:50:40 2016
@@ -791,7 +791,7 @@
 - (BOOL) createDirectoryAtPath: (NSString *)path
    withIntermediateDirectories: (BOOL)flag
                    attributes: (NSDictionary *)attributes
-                        error: (NSError **) error
+                        error: (NSError **)error
 {
   BOOL result = NO;
 

Modified: libs/base/trunk/Source/NSURLConnection.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSURLConnection.m?rev=39502&r1=39501&r2=39502&view=diff
==============================================================================
--- libs/base/trunk/Source/NSURLConnection.m    (original)
+++ libs/base/trunk/Source/NSURLConnection.m    Wed Mar  9 15:50:40 2016
@@ -263,8 +263,15 @@
 - (void) connection: (NSURLConnection *)connection
   didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge
 {
-  [[challenge sender]
-    continueWithoutCredentialForAuthenticationChallenge: challenge];
+  if ([challenge proposedCredential] == nil
+    || [challenge previousFailureCount] > 0)
+    {
+      /* continue without a credential if there is no proposed credential
+       * at all or if an authentication failure has already happened.
+       */
+      [[challenge sender]
+        continueWithoutCredentialForAuthenticationChallenge: challenge];
+    }
 }
 
 - (void) connection: (NSURLConnection *)connection


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to