Fixed a regression in WebFinger by tag
ci/woodpecker/push/ociImagePush Pipeline is running Details

This commit is contained in:
Natty 2024-04-01 05:09:09 +02:00
parent 0dff0c0785
commit 014b394f66
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 11 additions and 6 deletions

View File

@ -47,12 +47,17 @@ pub async fn handle_webfinger(
StatusCode::UNPROCESSABLE_ENTITY StatusCode::UNPROCESSABLE_ENTITY
})?; })?;
ck.get_user_by_tag(tag.name.as_ref(), tag.host.as_ref()) ck.get_user_by_tag(
.await tag.name.as_ref(),
.map_err(|e| { tag.host
error!("Data error: {e}"); .as_ref()
StatusCode::INTERNAL_SERVER_ERROR .filter(|host| host.to_string() != config.networking.host),
})? )
.await
.map_err(|e| {
error!("Data error: {e}");
StatusCode::INTERNAL_SERVER_ERROR
})?
} }
WebFingerSubject::Url(url) => { WebFingerSubject::Url(url) => {
let object_url = url.parse::<Url>().map_err(|e| { let object_url = url.parse::<Url>().map_err(|e| {