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:
ypsdf1
2026-11-26 20:55:27 +08:00
parent 6bae0bab5e
commit 9fb5a85e0c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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,