mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 14:20:29 -04:00
Fix Github URL validation in projects
This commit is contained in:
parent
a1da50fc1a
commit
a46ff8e137
2 changed files with 2 additions and 4 deletions
|
@ -230,7 +230,7 @@ class Project{
|
|||
}
|
||||
elseif(preg_match('|^https?://(www\.)?github.com/|ius', $this->VcsUrl)){
|
||||
$this->VcsUrl = rtrim($this->VcsUrl, '/');
|
||||
if(!preg_match('|^https://github.com/[^/]+/[^/]+|ius', $this->VcsUrl)){
|
||||
if(!preg_match('|^https://github.com/[^/]+/[^/]+$|ius', $this->VcsUrl)){
|
||||
$error->Add(new Exceptions\InvalidVcsUrlException());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue