# HG changeset patch # User Kim Alvefur # Date 1751464505 -7200 # Node ID fe797da37174eefff346c5244ec1d6bc0370e58d # Parent 8108aec64fb9846bd73a1961e4310c49b46ec0bf mod_http_oauth2: Use cheaper array member check This one does not create two new tables and then throw them away. diff -r 8108aec64fb9 -r fe797da37174 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Wed Jul 02 15:53:02 2025 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed Jul 02 15:55:05 2025 +0200 @@ -1088,7 +1088,7 @@ return render_error(oauth_error("invalid_request", "Invalid 'client_id' parameter")); end - if not set.new(client.grant_types):contains(device_uri) then + if not array_contains(client.grant_types, device_uri) then return render_error(oauth_error("invalid_client", "Client not registered for device authorization grant")); end