Skip to content

parser: fail upon duplicate declarations#24

Merged
hargoniX merged 1 commit intomasterfrom
joachim/parse-no-dup
Feb 26, 2026
Merged

parser: fail upon duplicate declarations#24
hargoniX merged 1 commit intomasterfrom
joachim/parse-no-dup

Conversation

@nomeata
Copy link
Contributor

@nomeata nomeata commented Feb 26, 2026

While most attacks involving duplicate declarations that actually prove
False would still be caught if one delaration is simply ignored, it
seems safer to catch this early and for all users of the parser. At
least until someone comes up with a use case for duplicate declarations
in the same file.

While most attacks involving duplicate declarations that actually prove
False would still be caught if one delaration is simply ignored, it
seems safer to catch this early and for all users of the parser. At
least until someone comes up with a use case for duplicate declarations
in the same file.
@nomeata nomeata marked this pull request as ready for review February 26, 2026 17:56
@nomeata
Copy link
Contributor Author

nomeata commented Feb 26, 2026

@hargoniX do any of your use cases require this to parse files with duplicate declarations?

@hargoniX
Copy link
Contributor

No, I had previously thought about this and it seemed fine to me but I agree we should be paranoid, let's do it 👍

@hargoniX hargoniX merged commit f297dfe into master Feb 26, 2026
1 check passed
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