Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5231:bef543068077

mod_http_oauth2: Fix to disable disabled response handlers correctly Wrong table
author Kim Alvefur <zash@zash.se>
date Fri, 10 Mar 2023 12:03:23 +0100
parent 5230:ac252db71027
child 5236:ff8623e2f9d9
comparison
equal deleted inserted replaced
5230:ac252db71027 5231:bef543068077
455 -- "token" aka implicit flow is considered insecure 455 -- "token" aka implicit flow is considered insecure
456 local allowed_response_type_handlers = module:get_option_set("allowed_oauth2_response_types", {"code"}) 456 local allowed_response_type_handlers = module:get_option_set("allowed_oauth2_response_types", {"code"})
457 for handler_type in pairs(response_type_handlers) do 457 for handler_type in pairs(response_type_handlers) do
458 if not allowed_response_type_handlers:contains(handler_type) then 458 if not allowed_response_type_handlers:contains(handler_type) then
459 module:log("debug", "Response type %q disabled", handler_type); 459 module:log("debug", "Response type %q disabled", handler_type);
460 grant_type_handlers[handler_type] = nil; 460 response_type_handlers[handler_type] = nil;
461 else 461 else
462 module:log("debug", "Response type %q enabled", handler_type); 462 module:log("debug", "Response type %q enabled", handler_type);
463 end 463 end
464 end 464 end
465 465