comparison mod_http_oauth2/mod_http_oauth2.lua @ 5473:e4382f6e3564

mod_http_oauth2: Tweak formatting of log message No need to `or ""` anymore since Prosody rev e88db5668cfb (0.11.0) and the %q format should produce either (nil) or "http://example"
author Kim Alvefur <zash@zash.se>
date Thu, 18 May 2023 13:27:27 +0200
parents b80b6947b079
children d0b93105b289
comparison
equal deleted inserted replaced
5472:b80b6947b079 5473:e4382f6e3564
608 -- error directly to the user-agent. 608 -- error directly to the user-agent.
609 local function error_response(request, err) 609 local function error_response(request, err)
610 local q = request.url.query and http.formdecode(request.url.query); 610 local q = request.url.query and http.formdecode(request.url.query);
611 local redirect_uri = q and q.redirect_uri; 611 local redirect_uri = q and q.redirect_uri;
612 if not redirect_uri or not is_secure_redirect(redirect_uri) then 612 if not redirect_uri or not is_secure_redirect(redirect_uri) then
613 module:log("warn", "Missing or invalid redirect_uri <%s>, rendering error to user-agent", redirect_uri or ""); 613 module:log("warn", "Missing or invalid redirect_uri %q, rendering error to user-agent", redirect_uri);
614 return render_error(err); 614 return render_error(err);
615 end 615 end
616 local redirect_query = url.parse(redirect_uri); 616 local redirect_query = url.parse(redirect_uri);
617 local sep = redirect_query.query and "&" or "?"; 617 local sep = redirect_query.query and "&" or "?";
618 redirect_uri = redirect_uri 618 redirect_uri = redirect_uri