hot fix
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 12s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 12s

This commit is contained in:
wt committed 2025-09-02 09:46:12 +07:00
1 parent fbc5ba375d
commit b986ab6b0d
1 file changed
+2 -4
+2 -4
View File
@@ -5,14 +5,12 @@
void verify_token(struct mg_connection *c, struct mg_http_message *hm) {
request_with_token *data = check_body(hm);
if (data->error != nullptr) {
mg_http_reply(c, 403, HTTP_HEADERS, "{%m:%m}", MG_ESC("error"),
MG_ESC(data->error));
mg_http_reply(c, 403, HTTP_HEADERS, "{%m:false}", MG_ESC("valid"));
return;
}
const bool valid = jwt_verifyJWT(data->token, JWT_DEFAULT_SECRET);
if (!valid) {
mg_http_reply(c, 403, HTTP_HEADERS, "{%m:%m}", MG_ESC("error"),
MG_ESC("invalid token"));
mg_http_reply(c, 403, HTTP_HEADERS, "{%m:false}", MG_ESC("valid"));
free_request_with_token(data);
return;
}