From 14a2df5ae225def61e3af61fa2e3f91d3a3ea20f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 17 Nov 2019 22:14:42 +0100 Subject: [PATCH] Print reason for Auth Failure. Signed-off-by: DL6ER --- src/api/auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/auth.c b/src/api/auth.c index 2846ee1b..cd69a49e 100644 --- a/src/api/auth.c +++ b/src/api/auth.c @@ -67,9 +67,11 @@ int check_client_auth(struct mg_connection *conn) user_id, timestr, auth_data[user_id].remote_addr); } } + else if(config.debug & DEBUG_API) + logg("Authentification: FAIL (cookie invalid/expired)"); } - if(user_id < 0 && config.debug & DEBUG_API) - logg("Authentification: FAIL"); + else if(config.debug & DEBUG_API) + logg("Authentification: FAIL (no cookie provided)"); return user_id; }