New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing private key for signed fetch #4516
Conversation
f9795cc
to
0531b47
Compare
.await?; | ||
|
||
res.site.private_key = None; | ||
Ok(res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output of this function is used for signed fetch, and it would crash due to missing private key. Actually there should be no need to set it as None, we can simply use serde(skip).
0531b47
to
d043d6d
Compare
pub private_key: Option<String>, | ||
#[serde(skip)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the pub key need to get sent elsewhere? I guess the federation tests would be failing if that weren't the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but that is done in a separate struct. You can compare the db structs for user or community which have the same skip attributes.
With these changes Im able to fetch a Mastodon user that requires signed fetch.