Fix JSON payload being potentially mutated when processing interaction policies (#36392)
This commit is contained in:
parent
4c12c2ed60
commit
d8ddf95485
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ class ActivityPub::Parser::StatusParser
|
||||||
def quote_subpolicy(subpolicy)
|
def quote_subpolicy(subpolicy)
|
||||||
flags = 0
|
flags = 0
|
||||||
|
|
||||||
allowed_actors = as_array(subpolicy)
|
allowed_actors = as_array(subpolicy).dup
|
||||||
allowed_actors.uniq!
|
allowed_actors.uniq!
|
||||||
|
|
||||||
flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] if allowed_actors.delete('as:Public') || allowed_actors.delete('Public') || allowed_actors.delete('https://www.w3.org/ns/activitystreams#Public')
|
flags |= Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] if allowed_actors.delete('as:Public') || allowed_actors.delete('Public') || allowed_actors.delete('https://www.w3.org/ns/activitystreams#Public')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue