dav: Fix Destination header percent decoding

This commit is contained in:
Lennart
2025-06-14 16:49:34 +02:00
parent 829d4a4385
commit 0c48507f0c
4 changed files with 7 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ pub(crate) async fn axum_route_copy<R: ResourceService>(
let mut router = matchit::Router::new();
router.insert(matched_path.as_str(), ()).unwrap();
if let Ok(matchit::Match { params, .. }) = router.at(destination) {
let params: Vec<(&str, &str)> = params.iter().collect();
let params = matchit_serde::Params(&params);
let params =
matchit_serde::Params::try_from(&params).map_err(|_| crate::Error::Forbidden)?;
let dest_path = R::PathComponents::deserialize(&ParamsDeserializer::new(params))
.map_err(|_| crate::Error::Forbidden)?;