Browse Source

fix: Do not allow fetching cached remote users' profiles over federation

Nyaaori/full-profile-directory
Nyaaori 3 years ago
parent
commit
f458916919
No known key found for this signature in database
GPG Key ID: E7819C3ED4D1F82E
  1. 7
      src/api/server_server.rs

7
src/api/server_server.rs

@ -1716,6 +1716,13 @@ pub async fn get_profile_information_route(
return Err(Error::bad_config("Federation is disabled."));
}
if body.user_id.server_name() != services().globals.server_name() {
return Err(Error::BadRequest(
ErrorKind::NotFound,
"User does not belong to this server",
));
}
let mut displayname = None;
let mut avatar_url = None;
let mut blurhash = None;

Loading…
Cancel
Save