mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-19 17:02:22 +08:00
fix(Gateway auth): cast numberic value to string value when compare gateway token (github #77)
github #77
This commit is contained in:
@@ -15,7 +15,7 @@ class APIAuth
|
||||
static function auth(array $authTypes)
|
||||
{
|
||||
if (in_array(self::AUTH_TYPE_GATEWAY, $authTypes)) {
|
||||
if ((string) Request::parse()->token === YAML_GATEWAY_TOKEN) {
|
||||
if ((string) Request::parse()->token === (string) YAML_GATEWAY_TOKEN) {
|
||||
Request::setAuthData([]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user