summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-02-13 08:00:31 +0100
committermetamuffin <metamuffin@disroot.org>2023-02-13 08:00:31 +0100
commit4153ae68e4972c7e5a4a45ac1c91a9ceee52a7de (patch)
tree30e686c3d32ea5ba7f440fcf655a0088550ff299
parent07d9a7b452e91715a55a1fe5c7451aac455b1d56 (diff)
downloadmetamuffin-website-4153ae68e4972c7e5a4a45ac1c91a9ceee52a7de.tar
metamuffin-website-4153ae68e4972c7e5a4a45ac1c91a9ceee52a7de.tar.bz2
metamuffin-website-4153ae68e4972c7e5a4a45ac1c91a9ceee52a7de.tar.zst
add security.txt and pgp key
-rw-r--r--assets/key.asc16
-rw-r--r--src/layout.rs1
-rw-r--r--src/main.rs2
-rw-r--r--src/pages.rs5
-rw-r--r--src/wellknown.rs8
5 files changed, 32 insertions, 0 deletions
diff --git a/assets/key.asc b/assets/key.asc
new file mode 100644
index 0000000..7a9744c
--- /dev/null
+++ b/assets/key.asc
@@ -0,0 +1,16 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mDMEYv5yMRYJKwYBBAHaRw8BAQdAfrtqCI7LEQoszlZ/nVoH6/H8X/yIl+eUJY7Q
+Bj4ZktK0MW1ldGFtdWZmaW4gKG1haWxpbmcga2V5KSA8bWV0YW11ZmZpbkBkaXNy
+b290Lm9yZz6IkAQTFggAOBYhBC11CxJF4bFDjtQetmgQPYIwKNvABQJi/nIxAhsD
+BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEGgQPYIwKNvAPO8BAPJZj4NkaZEH
++deO9SWmCWXPhYS/k35VwPuM+2oNqDvKAQDo18mPa0/V35C01OOVOi0frZTpCxfj
+L757th4oDXoJDoh1BBAWCAAdFiEECTeqGIprRXPrquBlpC2mF0b6mbUFAmL+dLIA
+CgkQpC2mF0b6mbVytwEA1Fwk2XoFxhTJH2zkgHVPfqOdb4NYJRt/Y32NYHrHqN4A
+/3QbQvtpgGLyKIgzrfy03RTrQgn9zBBzmwttTbXnSRYKuDgEYv5yMRIKKwYBBAGX
+VQEFAQEHQJQYxyJkdQ4xQkXNUKgMRYUE7a7SA9Bh6tfHGRk5YKwjAwEIB4h4BBgW
+CAAgFiEELXULEkXhsUOO1B62aBA9gjAo28AFAmL+cjECGwwACgkQaBA9gjAo28Cn
+vQEAws7nVCxY7OkjsEWgXDZKUx34peZscfwDC6nA/Akw3L4A/0P4NG+kRgML2UOr
+EfkX+Bu+UToBcr7qgSg835vIbxIG
+=K7l9
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/src/layout.rs b/src/layout.rs
index e0ce469..d7b06f2 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -28,6 +28,7 @@ markup::define! {
a[href=uri!(r_projects())] { "Projects" } " "
a[href=uri!(r_contact())] { "Contact" } " "
a[href="https://codeberg.org/metamuffin"] { "Codeberg" } " "
+ a[href=uri!(r_pgp_key())] { "PGP-Key" } " "
}
hr;
section { @main }
diff --git a/src/main.rs b/src/main.rs
index 884b64b..24f2c61 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -27,6 +27,8 @@ async fn main() {
r_about,
r_contact,
r_projects,
+ r_pgp_key,
+ r_wellknown_security,
r_wellknown_matrix_server,
r_wellknown_matrix_client,
],
diff --git a/src/pages.rs b/src/pages.rs
index 82b56ca..720bfba 100644
--- a/src/pages.rs
+++ b/src/pages.rs
@@ -92,6 +92,11 @@ pub fn r_contact() -> DynLayoutPage<'static> {
}
}
+#[get("/key.asc")]
+pub fn r_pgp_key() -> &'static str {
+ include_str!("../assets/key.asc")
+}
+
#[catch(default)]
pub fn r_catch<'a>(status: Status, _request: &Request) -> DynLayoutPage<'a> {
LayoutPage {
diff --git a/src/wellknown.rs b/src/wellknown.rs
index 2ec3255..9c9bc1c 100644
--- a/src/wellknown.rs
+++ b/src/wellknown.rs
@@ -28,3 +28,11 @@ pub fn r_wellknown_matrix_client() -> Cors<Value> {
pub fn r_wellknown_matrix_server() -> Cors<Value> {
Cors(json!({"m.server": "matrix.metamuffin.org:443"} ))
}
+
+#[get("/.well-known/security.txt")]
+pub fn r_wellknown_security() -> &'static str {
+ r#"# In can case you found a security vulnerability in my services and want to disclose them privately, use the information below.
+Contact: https://metamuffin.org/contact
+Encryption: https://metamuffin.org/key.asc
+ "#
+}