Fix Github URL validation in projects

This commit is contained in:
Alex Cabal 2024-12-18 14:55:04 -06:00
parent a1da50fc1a
commit a46ff8e137
2 changed files with 2 additions and 4 deletions

View file

@ -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());
}
}