[Security] StealEmojiPolicy: Sanitize shortcodes #701
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#701
Loading…
Reference in a new issue
No description provided.
Delete branch "erincandescent/akkoma:stealemojipolicy-sanitize"
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?
Pleroma announced this one as a security vuln and our code is identical here. It sems to allow directory traversal, which would allow a stolen emoji to smash over one from a pack.
I wonder if we should also hardcode a list of emoji names which are always banned such as
"."
and".."
. Then again, are dots even allowed in shortcodes? Can we just ban shortcodes with dots?You know what, I don't see a good reason to allow dots or colons, so we should probably block those too
The fact that this just takes the extension from the origin seems potentially smelly to me (
emoji.activitystreams2
anyone?) but at least this leaves things in a safer state than we found itthanks for pulling this over, i'll format it my side to get this in dev asap