From a8700015cf87cc33058ba106928950dc9a558381 Mon Sep 17 00:00:00 2001 From: Xeron <2398003522@qq.com> Date: Sun, 29 Jun 2025 13:38:25 +0800 Subject: [PATCH] [Milky] Fixed access token validation --- Lagrange.Milky/Api/MilkyHttpApiService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lagrange.Milky/Api/MilkyHttpApiService.cs b/Lagrange.Milky/Api/MilkyHttpApiService.cs index 408afa91..cd775a61 100644 --- a/Lagrange.Milky/Api/MilkyHttpApiService.cs +++ b/Lagrange.Milky/Api/MilkyHttpApiService.cs @@ -126,7 +126,7 @@ private async Task ValidateHttpContextAsync(HttpListenerContext context, C private bool ValidateAccessToken(HttpListenerContext context) { - if (_token == null) return true; + if (string.IsNullOrEmpty(_token)) return true; string? authorization = context.Request.Headers["Authorization"]; if (authorization == null) return false;