소스 검색

Merge pull request #288 from fancyguy/master

Packagist cannot add packages from ssh url
Jordi Boggiano 12 년 전
부모
커밋
59b293fa2e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Packagist/WebBundle/Entity/Package.php

+ 2 - 2
src/Packagist/WebBundle/Entity/Package.php

@@ -163,7 +163,7 @@ class Package
         $property = 'repository';
         $driver = $this->vcsDriver;
         if (!is_object($driver)) {
-            if (preg_match('{//.+@}', $this->repository)) {
+            if (preg_match('{https?://.+@}', $this->repository)) {
                 $context->addViolationAtSubPath($property, 'URLs with user@host are not supported, use a read-only public URL', array(), null);
             } else {
                 $context->addViolationAtSubPath($property, 'No valid/supported repository was found at the given URL', array(), null);
@@ -326,7 +326,7 @@ class Package
         $this->repository = $repository;
 
         // avoid user@host URLs
-        if (preg_match('{//.+@}', $repository)) {
+        if (preg_match('{https?://.+@}', $repository)) {
             return;
         }