Add some extra access checks for attachments and groups

This commit is contained in:
Daniel García
2023-07-03 19:58:14 +02:00
parent e7f083dee9
commit 60964c07e6
7 changed files with 101 additions and 28 deletions

View File

@ -1,7 +1,10 @@
//
// Web Headers and caching
//
use std::io::{Cursor, ErrorKind};
use std::{
io::{Cursor, ErrorKind},
ops::Deref,
};
use rocket::{
fairing::{Fairing, Info, Kind},
@ -209,6 +212,14 @@ impl std::fmt::Display for SafeString {
}
}
impl Deref for SafeString {
type Target = String;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl AsRef<Path> for SafeString {
#[inline]
fn as_ref(&self) -> &Path {