This commit is contained in:
liyuchun
2022-04-19 11:16:53 +08:00
parent ade40aaa75
commit 2d3195b0e6
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ class scm
*/
public static function checkRevision($revision)
{
if(preg_match('/[^a-z0-9\-_\.\^]/i', $revision)) return false;
if(preg_match('/[^a-z0-9\-_\.\^\w][\x{4e00}-\x{9fa5}]/ui', $revision)) return false;
return true;
}
}
+4 -3
View File
@@ -272,9 +272,10 @@ class repo extends control
$this->commonAction($repoID, $objectID);
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = $this->repo->decodePath($entry);
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = $this->repo->decodePath($entry);
$revision = str_replace('*', '-', $revision);
$this->scm->setEngine($repo);
$info = $this->scm->info($entry, $revision);