Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of eval() from recognizer.py #4480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

panzi
Copy link

@panzi panzi commented Jan 14, 2025

eval(op_type) -> getattr(operators, op_type)

What problem does this PR solve?

Using eval() can lead to code injections and is entirely unnecessary here.

Type of change

  • Other (please describe):

Best practice code improvement, preventing the possibility of code injection.

`eval(op_type)` -> `getattr(operators, op_type)`
@JinHai-CN JinHai-CN added the ci Continue Integration label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continue Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants