# HG changeset patch # User Kim Alvefur # Date 1603484600 -7200 # Node ID 3eb595cf847ff7642b5445340a0b5631e531dede # Parent 13b065432bf20c018ae63fdd27a69d1516e20ea9 mod_http_oauth2: Accept empty scope Some tool I used couldn't not send a scope, preventing it from working with mod_http_oauth2. This change should fix that. diff -r 13b065432bf2 -r 3eb595cf847f mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Fri Oct 23 22:07:06 2020 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Fri Oct 23 22:23:20 2020 +0200 @@ -32,7 +32,7 @@ local request_jid = assert(params.username, oauth_error("invalid_request", "missing 'username' (JID)")); local request_password = assert(params.password, oauth_error("invalid_request", "missing 'password'")); local request_username, request_host, request_resource = jid.prepped_split(request_jid); - if params.scope then + if params.scope and param.scope ~= "" then return oauth_error("invalid_scope", "unknown scope requested"); end if not (request_username and request_host) or request_host ~= module.host then