mirror of
https://github.com/PGYER/codefever.git
synced 2026-06-05 19:25:28 +08:00
@@ -40,7 +40,7 @@ class Internal extends Base
|
||||
$data = Request::parse()->parsed;
|
||||
|
||||
$parsedRepo = [];
|
||||
preg_match("/([\w\d\_]+)\/([\w\d\_]+)\.git/", $data['repo'], $parsedRepo);
|
||||
preg_match("/([\w\d_]+)\/([\w\d_]+)\.git/", $data['repo'], $parsedRepo);
|
||||
|
||||
if ($data && $data['userID'] && $data['repo'] && $data['action'] && $parsedRepo[0] && $parsedRepo[1]) {
|
||||
|
||||
@@ -74,6 +74,7 @@ class Internal extends Base
|
||||
// group or repository not found
|
||||
Response::reject(0x0302);
|
||||
}
|
||||
|
||||
Response::reject(0x0201);
|
||||
}
|
||||
|
||||
@@ -81,7 +82,7 @@ class Internal extends Base
|
||||
$data = Request::parse()->parsed;
|
||||
|
||||
$parsedRepo = [];
|
||||
preg_match("/([\w\d\_]+)\/([\w\d\_]+)\.git/", $data['repo'], $parsedRepo);
|
||||
preg_match("/([\w\d_]+)\/([\w\d_]+)\.git/", $data['repo'], $parsedRepo);
|
||||
|
||||
if ($data && $data['user'] && $data['pass'] && $data['repo'] && $parsedRepo[1] && $parsedRepo[2]) {
|
||||
// check email and password
|
||||
@@ -134,6 +135,7 @@ class Internal extends Base
|
||||
// user not found
|
||||
Response::reject(0x0101);
|
||||
}
|
||||
|
||||
Response::reject(0x0201);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class APIAuth
|
||||
static function auth(array $authTypes)
|
||||
{
|
||||
if (in_array(self::AUTH_TYPE_GATEWAY, $authTypes)) {
|
||||
if (Request::parse()->token === YAML_GATEWAY_TOKEN) {
|
||||
if ((string) Request::parse()->token === YAML_GATEWAY_TOKEN) {
|
||||
Request::setAuthData([]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ chmod 0777 ../config.yaml ../env.yaml
|
||||
echo 'env files generated!'
|
||||
|
||||
mkdir ../application/logs
|
||||
chmod -R git:git ../application/logs
|
||||
chown -R git:git ../application/logs
|
||||
|
||||
chmod -R 0777 ../git-storage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user