Skip to content

fix(shell-bson-parser): do not allow arbitrary function calls on literals COMPASS-10678#784

Merged
gribnoysup merged 2 commits into
mainfrom
COMPASS-10678
Jun 17, 2026
Merged

fix(shell-bson-parser): do not allow arbitrary function calls on literals COMPASS-10678#784
gribnoysup merged 2 commits into
mainfrom
COMPASS-10678

Conversation

@gribnoysup

Copy link
Copy Markdown
Collaborator

We are already pretty strict about allowed function calls during parse, this patch makes the logic a bit stricter. I can't think of a case where we'd want to allow these cases for any of our purposes, but tell me if we should allowlist some methods here

See COMPASS-10678 for some extra context

@gribnoysup gribnoysup requested a review from addaleax June 17, 2026 10:47

@addaleax addaleax left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like strictly an improvement, but the source change here isn't tested, right? nvm, just missed that it's rolled into the same test case

@gribnoysup

Copy link
Copy Markdown
Collaborator Author

Whoops, my bad, should've split it in two separate ones

@gribnoysup gribnoysup enabled auto-merge (squash) June 17, 2026 11:53
@gribnoysup gribnoysup merged commit 9350cf0 into main Jun 17, 2026
12 of 14 checks passed
@gribnoysup gribnoysup deleted the COMPASS-10678 branch June 17, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants