mirror of
https://github.com/matze/wastebin.git
synced 2026-04-25 08:36:00 +03:00
[PR #80] [MERGED] Security headers #149
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wastebin-matze#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/matze/wastebin/pull/80
Author: @cgzones
Created: 11/12/2024
Status: ✅ Merged
Merged: 1/11/2025
Merged by: @matze
Base:
master← Head:security_headers📝 Commits (2)
921324eAvoid inline styles and scriptsa705a4aAdd security headers📊 Changes
11 files changed (+224 additions, -110 deletions)
View changed files
📝
src/env.rs(+2 -1)📝
src/highlight.rs(+17 -0)➕
src/javascript/index.js(+69 -0)➕
src/javascript/paste.js(+44 -0)📝
src/main.rs(+42 -1)📝
src/routes/assets.rs(+17 -0)📝
src/themes/style.css(+17 -0)📝
templates/base.html(+1 -0)📝
templates/encrypted.html(+4 -4)📝
templates/index.html(+5 -63)📝
templates/paste.html(+6 -41)📄 Description
Modern browser support security headers, in particular Content Security
Policy (CSP)(https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
These can help mitigating XSS vulnerabilities, in the case of pastes by
disallowing inline styles and scripts.
Move all current inline styles into the global style.css, and refactor
all inline javascript into separate asset files.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.