mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
[PR #3058] [MERGED] Removed unsafe-inline JS from CSP and other fixes #3103
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3058
Author: @BlackDex
Created: 12/28/2022
Status: ✅ Merged
Merged: 1/9/2023
Merged by: @dani-garcia
Base:
main← Head:remove-inline-js📝 Commits (1)
613b251Removed unsafe-inline JS from CSP and other fixes📊 Changes
18 files changed (+946 additions, -718 deletions)
View changed files
📝
src/api/admin.rs(+14 -26)📝
src/api/web.rs(+11 -0)📝
src/config.rs(+15 -0)➕
src/static/scripts/404.css(+26 -0)➕
src/static/scripts/admin.css(+45 -0)➕
src/static/scripts/admin.js(+65 -0)➕
src/static/scripts/admin_diagnostics.js(+219 -0)➕
src/static/scripts/admin_organizations.js(+54 -0)➕
src/static/scripts/admin_settings.js(+180 -0)➕
src/static/scripts/admin_users.js(+246 -0)📝
src/static/scripts/bootstrap.css(+0 -2)📝
src/static/templates/404.hbs(+2 -26)📝
src/static/templates/admin/base.hbs(+2 -94)📝
src/static/templates/admin/diagnostics.hbs(+13 -194)📝
src/static/templates/admin/organizations.hbs(+9 -36)📝
src/static/templates/admin/settings.hbs(+11 -154)📝
src/static/templates/admin/users.hbs(+29 -173)📝
src/util.rs(+5 -13)📄 Description
unsafe-inlinefor javascript from CSP. The admin interface now uses files instead of inline javascript.to_jsonHandlebars helper. Used at the diagnostics page.AdminTemplateDatastruct to be smaller. Theconfigwas always added, but only used at one page. Same goes forcan_backupandversion.We can't remove the
unsafe-inlinefrom css, because that seems tobreak the web-vault currently. That might need some further checks.
But for now the 404 page and all the admin pages are clear of inline scripts and styles.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.