AnthonyDeroche / mod_authnz_jwt

An authentication module for Apache httpd using JSON Web Tokens
Other
79 stars 46 forks source link

Incorrect call to ap_log_rerror() #52

Closed jbloggz closed 3 years ago

jbloggz commented 3 years ago

If you make a request to a protected page but don't provide a token (through either the Authorization header or cookie), you get errors like the following in the logs; [Fri Mar 05 21:52:36.960160 2021] [auth_jwt:error] [pid 9213:tid 140084577822464] [client 127.0.0.1:41868] AH55404: So the error description is missing.

A check of the code shows the issue is caused y an incorrect call to ap_log_rerror(): 1126: ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, logCode, logStr);

This should instead be: ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s%s", logCode, logStr);