# HG changeset patch # User Matthew Wild # Date 1678203079 0 # Node ID cd5cf4cc6304176691b896f2cd05e06b56ccbc26 # Parent 8b2a3684791215c5f567edade293b251edc9c872 mod_http_oauth2: Fail early when no authorization header present Fixes traceback. diff -r 8b2a36847912 -r cd5cf4cc6304 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Tue Mar 07 15:27:50 2023 +0000 +++ b/mod_http_oauth2/mod_http_oauth2.lua Tue Mar 07 15:31:19 2023 +0000 @@ -342,6 +342,8 @@ end local function get_request_credentials(request) + if not request.headers.authorization then return; end + local auth_type, auth_data = string.match(request.headers.authorization, "^(%S+)%s(.+)$"); if auth_type == "Basic" then