mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-12 05:07:40 +02:00
Add some extra access checks for attachments and groups
This commit is contained in:
13
src/util.rs
13
src/util.rs
@ -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 {
|
||||
|
Reference in New Issue
Block a user