Software /
code /
prosody-modules
Changeset
5665:7c105277a9ca
mod_http_oauth2: Remove broken in-CSS templating
Because util.interpolation with a "%b{}" pattern only matches the outer
brackets, so variables inside them would not work unless the pattern is
changed (also considered).
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 27 Aug 2023 09:49:35 +0200 |
parents | 5659:9ce8ee530438 |
children | 5666:73c3d5bfce3e |
files | mod_http_oauth2/README.markdown mod_http_oauth2/mod_http_oauth2.lua |
diffstat | 2 files changed, 1 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_oauth2/README.markdown Sun Aug 27 15:33:14 2023 +0200 +++ b/mod_http_oauth2/README.markdown Sun Aug 27 09:49:35 2023 +0200 @@ -78,15 +78,6 @@ oauth2_template_path = "/etc/prosody/custom-oauth2-templates" ``` -Some templates support additional variables, that can be provided by the -`oauth2_template_style` option: - -```lua -oauth2_template_style = { - background_colour = "#ffffff"; -} -``` - If you know what features your templates use use you can adjust the `Content-Security-Policy` header to only allow what is needed:
--- a/mod_http_oauth2/mod_http_oauth2.lua Sun Aug 27 15:33:14 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Aug 27 09:49:35 2023 +0200 @@ -1432,7 +1432,7 @@ headers = { ["Content-Type"] = "text/css"; }; - body = render_html(templates.css, module:get_option("oauth2_template_style")); + body = templates.css; } or nil; ["GET /script.js"] = templates.js and { headers = {