Mercurial > prosody-modules
comparison mod_http_oauth2/mod_http_oauth2.lua @ 5217:6a27effb3ef0
mod_http_oauth2: Fix incorrect function name (thanks Zash/luacheck)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Mar 2023 10:27:40 +0000 |
parents | d5492bc861f6 |
children | 1f4b768c831a |
comparison
equal
deleted
inserted
replaced
5216:1d9dbe84b6e8 | 5217:6a27effb3ef0 |
---|---|
388 -- the redirect_uri is missing or invalid. In those cases, we render an | 388 -- the redirect_uri is missing or invalid. In those cases, we render an |
389 -- error directly to the user-agent. | 389 -- error directly to the user-agent. |
390 local function error_response(request, err) | 390 local function error_response(request, err) |
391 local q = request.url.query and http.formdecode(request.url.query); | 391 local q = request.url.query and http.formdecode(request.url.query); |
392 local redirect_uri = q and q.redirect_uri; | 392 local redirect_uri = q and q.redirect_uri; |
393 if not redirect_uri or not is_safe_redirect(redirect_uri) then | 393 if not redirect_uri or not is_secure_redirect(redirect_uri) then |
394 module:log("warn", "Missing or invalid redirect_uri <%s>, rendering error to user-agent", redirect_uri or ""); | 394 module:log("warn", "Missing or invalid redirect_uri <%s>, rendering error to user-agent", redirect_uri or ""); |
395 return render_page(templates.error, { error = err }); | 395 return render_page(templates.error, { error = err }); |
396 end | 396 end |
397 local redirect_query = url.parse(redirect_uri); | 397 local redirect_query = url.parse(redirect_uri); |
398 local sep = redirect_query and "&" or "?"; | 398 local sep = redirect_query and "&" or "?"; |