Explorar el Código

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

Jordi Boggiano hace 10 años
padre
commit
41f4451c20
Se han modificado 1 ficheros con 5 adiciones y 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:
             case STREAM_NOTIFY_AUTH_RESULT:
                 if (403 === $messageCode) {
                 if (403 === $messageCode) {
+                    // Bail if the caller is going to handle authentication failures itself.
+                    if (!$this->retryAuthFailure) {
+                        break;
+                    }
+
                     $this->promptAuthAndRetry($messageCode, $message);
                     $this->promptAuthAndRetry($messageCode, $message);
                     break;
                     break;
                 }
                 }