Explorar o código

take care of retry-auth-failure:false in case of 403 as well

Jordi Boggiano %!s(int64=10) %!d(string=hai) anos
pai
achega
41f4451c20
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/Composer/Util/RemoteFilesystem.php

+ 5 - 0
src/Composer/Util/RemoteFilesystem.php

@@ -308,6 +308,11 @@ class RemoteFilesystem
 
             case STREAM_NOTIFY_AUTH_RESULT:
                 if (403 === $messageCode) {
+                    // Bail if the caller is going to handle authentication failures itself.
+                    if (!$this->retryAuthFailure) {
+                        break;
+                    }
+
                     $this->promptAuthAndRetry($messageCode, $message);
                     break;
                 }