diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/indieauth/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/indieauth/mod.rs b/src/indieauth/mod.rs index e466d98..f7a9712 100644 --- a/src/indieauth/mod.rs +++ b/src/indieauth/mod.rs @@ -154,7 +154,7 @@ async fn authorization_endpoint_get<A: AuthBackend, D: Storage + 'static>( let text = response.text().await.unwrap(); tracing::debug!("Received {} bytes in response", text.len()); match microformats::from_html(&text, url) { - Ok(mf2) => { + Ok(mut mf2) => { if let Some(relation) = mf2.rels.items.get(&request.redirect_uri) { if !relation.rels.iter().any(|i| i == "redirect_uri") { return (StatusCode::BAD_REQUEST, @@ -200,6 +200,8 @@ async fn authorization_endpoint_get<A: AuthBackend, D: Storage + 'static>( _ => None }); + metadata.redirect_uris = mf2.rels.by_rels().remove("redirect_uri"); + metadata } else { return (StatusCode::BAD_REQUEST, [("Content-Type", "text/plain")], "No h-app or JSON application metadata found.").into_response() |