15m44z 续(20:54):修 fresh flag 路径 bug
gh_oauth.php / gh_cfg.php:dirname(__DIR__) 误解析到站点根 /,fresh flag 写到 /gh_oauth_fresh(不存在); 改 __DIR__/.. = /plugin,flag 文件写到 /plugin/gh_oauth_fresh/(已 FTP 创建)。
This commit is contained in:
+1
-1
@@ -205,7 +205,7 @@ if ($code !== '') {
|
||||
// ★ 15m44z 续(19:59 根治):OAuth 回调成功后写 fresh flag(短期 10min,按玩家名)
|
||||
// gh_cfg 读到 flag → 免 /user 验活直接判有效,彻底避开 CF 边缘偶发 401 把刚授权的有效
|
||||
// token 误判成「token 可能已失效」。flag 路径 __DIR__/../gh_oauth_fresh/{player}.json
|
||||
$freshDir = dirname(__DIR__) . '/../gh_oauth_fresh';
|
||||
$freshDir = __DIR__ . '/../gh_oauth_fresh';
|
||||
@mkdir($freshDir, 0755, true);
|
||||
@file_put_contents($freshDir . '/' . md5($player) . '.json', json_encode([
|
||||
'player' => $player, 'ts' => time(), 'exp' => time() + 600,
|
||||
|
||||
Reference in New Issue
Block a user