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)){ elseif(preg_match('|^https?://(www\.)?github.com/|ius', $this->VcsUrl)){
$this->VcsUrl = rtrim($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()); $error->Add(new Exceptions\InvalidVcsUrlException());
} }
} }

View file

@ -749,14 +749,12 @@ ul.message.error > li + li{
padding-top: 2rem; padding-top: 2rem;
} }
.data-table td:first-child,
.data-table th:first-child{ .data-table th:first-child{
padding-left: 0; padding-left: 0;
} }
.data-table td:last-child,
.data-table th:last-child{ .data-table th:last-child{
padding-left: 0; padding-right: 0;
} }
.data-table td, .data-table td,