You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found during a code-review pass (2026-07-23). Related to #14 and #35.
Several infallible From conversions .unwrap() on untrusted export/API JSON, so one malformed record panics the whole import/fetch instead of being skipped or reported.
impl From<serde_json::Value> for Actor → serde_json::from_value(value).unwrap() (src/activitystreams.rs), invoked on export data in src/mastodon/importer.rs. Actor has many non-optional fields; any missing/renamed field or bad published timestamp aborts import.
impl From<Status> for Activity → url::Url::parse(status.uri).unwrap() (src/activitystreams.rs), on remote API responses in src/mastodon/fetcher.rs.
Replace the infallible From impls with TryFrom (or call serde_json::from_value/Url::parse at the call site with ?) so callers can skip-with-warning or report bad records. Turn the token/actor lookups into checked errors with actionable messages.
Severity: high (crash-on-malformed-input across the two main ingest paths).
Found during a code-review pass (2026-07-23). Related to #14 and #35.
Several infallible
Fromconversions.unwrap()on untrusted export/API JSON, so one malformed record panics the whole import/fetch instead of being skipped or reported.impl From<serde_json::Value> for Actor→serde_json::from_value(value).unwrap()(src/activitystreams.rs), invoked on export data insrc/mastodon/importer.rs.Actorhas many non-optional fields; any missing/renamed field or badpublishedtimestamp aborts import.impl From<Status> for Activity→url::Url::parse(status.uri).unwrap()(src/activitystreams.rs), on remote API responses insrc/mastodon/fetcher.rs.access_token...unwrap()(panics when runningfetchbeforemastodon link— see Bug: Crash when attempting mastodon fetch against new instance, because actors haven't been populated #35),actors.get(actor_id).unwrap(),activity.actor.id().unwrap()insrc/mastodon/fetcher.rs, andunwrap()s over unresolved actors insrc/site_generator.rs.Suggested fix
Replace the infallible
Fromimpls withTryFrom(or callserde_json::from_value/Url::parseat the call site with?) so callers can skip-with-warning or report bad records. Turn the token/actor lookups into checked errors with actionable messages.Severity: high (crash-on-malformed-input across the two main ingest paths).