Add check to make sure that inbox doesnt receive local activities (ref #1283) #147

Merged
dessalines merged 2 commits from inbox-not-local into main 2020-12-01 18:30:19 +00:00
Owner
No description provided.
dessalines reviewed 2020-12-01 02:10:58 +00:00
@ -154,0 +160,4 @@
let activity_domain = id.domain().context(location_info!())?;
if activity_domain != Settings::get().hostname {
return Err(
Owner

Shouldn't it throw the error if it IS a local activity, IE activity_domain == my.hostname

Shouldn't it throw the error if it IS a local activity, IE activity_domain == my.hostname
Author
Owner

Damn you're right. I dont know how the tests passed with this.

Damn you're right. I dont know how the tests passed with this.
Author
Owner

Fixed, also pushed to github. Please squash when merging.

Fixed, also pushed to github. Please squash when merging.
Owner

Cool, once tests pass I'll squash and merge.

Cool, once tests pass I'll squash and merge.
Author
Owner

When I tested the original commit locally, I still had assert!() instead of return Err(), so I must have rewritten it wrong (and didnt run tests again).

When I tested the original commit locally, I still had `assert!()` instead of `return Err()`, so I must have rewritten it wrong (and didnt run tests again).
dessalines merged commit 2b5c69d678 into main 2020-12-01 18:30:19 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#147
No description provided.