Skip to content
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

Merged
merged 6 commits into from Mar 8, 2024
Merged

Fix missing private key for signed fetch #4516

merged 6 commits into from Mar 8, 2024

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Mar 7, 2024

With these changes Im able to fetch a Mastodon user that requires signed fetch.

@Nutomic Nutomic force-pushed the fix-signed-fetch branch 3 times, most recently from f9795cc to 0531b47 Compare March 7, 2024 11:10
.await?;

res.site.private_key = None;
Ok(res)
Copy link
Member Author

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).

Cargo.toml Outdated Show resolved Hide resolved
@Nutomic Nutomic marked this pull request as ready for review March 8, 2024 14:55
pub private_key: Option<String>,
#[serde(skip)]
Copy link
Member

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.

Copy link
Member Author

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.

@dessalines dessalines merged commit 5859502 into main Mar 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants