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

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

panzi
Copy link
Contributor

@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
@KevinHuSh KevinHuSh merged commit 75e1981 into infiniflow:main Jan 20, 2025
3 checks passed
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.

3 participants