comments to remote posts are federated with activity ids pointing at the remote instance #1161
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	A: API
		
			A: Backend
		
			A: Federation
		
			A: Front-End
		
			A: I18N
		
			A: Meta
		
			A: Security
		
			Build
		
			C: Bug
		
			C: Discussion
		
			C: Enhancement
		
			C: Feature
		
			Compatibility
		
			Dependency
		
			Design
		
			Documentation
		
			Good first issue
		
			Help welcome
		
			Mobile
		
			Rendering
		
			S: Blocked
		
			S: Duplicate
		
			S: Incomplete
		
			S: Instance specific
		
			S: Invalid
		
			S: Needs Voting/Discussion
		
			S: Ready for review
		
			Suggestion
		
			S: Voted on Loomio
		
			S: Wontfix
		
		
	
		No milestone
		
			
		
	
	No project
	
		
	
	
	
	
		No assignees
		
	
	
		
			
		
	
	
	
		1 participant
	
	
		
		
	Notifications
	
		
	
	
	
		
	
	
	Due date
No due date set.
	
		Dependencies
		
		
	
	
	No dependencies set.
		Reference: Plume/Plume#1161
		
	
		Loading…
	
	Add table
		
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "%!s()"
	 
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello!
While inspecting logs of an unrelated fediverse instance, we noticed a mismatch between the host in the signer's URL, and the host in the activity id, with the signature belonging to
https://fediverse.blog/@/someone/but the activity identifying itself ashttps://writeworks.uk/~/someblog/somepost//comment/12345This looked like an impersonation attempt (the signer pretending to be a writeworks account), and it was consequently discarded by our instance.
Looking into your source code, I believe the cause of the problem to be in https://git.joinplu.me/Plume/Plume/src/branch/main/plume-models/src/comments.rs#L64-L69 where it generates the URL for the comment based on the URL for the post being commented on. Which is fine when commenting on local posts, but generates nonsensical URLs when the post is remote: it's mashing a remote base URL with a locally-generated primary key. The generated AP URL needs to be under the hostname of the local instance, and should ideally be resolvable to the contents of the comment itself.
(please note that my knowledge of Rust is very rudimentary, and I had never looked at your codebase before now, so I can't really provide a fix…)