swarm-controller: refuse a link over any stored object, decodable or not
The existence check read the path as the route's credential type, so an object stored there that no longer decodes as one answered 500 instead of 409. It now reads the path untyped: anything stored holds the name.
This commit is contained in:
parent
8ad2af735e
commit
5971b51e65
2 changed files with 37 additions and 12 deletions
|
|
@ -200,9 +200,7 @@ async fn link_matrix(
|
|||
tracing::warn!(path, error = ?e, "linking the matrix account failed");
|
||||
Box::new(e.problem(existing))
|
||||
};
|
||||
refuse_linked::<matrix::Credential>(store, path)
|
||||
.await
|
||||
.map_err(refused)?;
|
||||
refuse_linked(store, path).await.map_err(refused)?;
|
||||
let (token, homeserver, user_id) = resolve_credential(req).await?;
|
||||
link(
|
||||
store,
|
||||
|
|
|
|||
Loading…
Reference in a new issue