Skip to content

Commit

Permalink
Instead match beginning of the acme-challenge string
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Feb 19, 2025
1 parent 7d8ef13 commit c2cf755
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/webserver/lua_web.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ int request_handler(struct mg_connection *conn, void *cbdata)

// Do not redirect for ACME challenges
log_info("Local URI: \"%s\"", req_info->local_uri_raw);
const bool is_acme = strcmp(req_info->local_uri_raw, "/.well-known/acme-challenge") == 0;
const char acme_challenge[] = "/.well-known/acme-challenge/";
const bool is_acme = strncmp(req_info->local_uri_raw, acme_challenge, sizeof(acme_challenge)) == 0;
if(is_acme)
{
// ACME challenge - no authentication required
Expand Down

0 comments on commit c2cf755

Please sign in to comment.