You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the PaddleOCR Docs and found no similar bug report.
I have searched the PaddleOCR Issues and found no similar bug report.
I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
I would like to flag that there are a number of scripts in your codebase that make use of eval() in ways that are unnecessary, overly liberal and possibly dangerous. In ppocr/postprocess/__init__.py, for example, eval() is used where a dictionary could easily perform the same functionality. In ppocr/data/imaug/__init__.py, the pattern from [script] import * is used 10 times and then eval() is used, which could easily have serious side-effects.
I would recommend refactoring the codebase to cease using eval().
🔎 Search before asking
🐛 Bug (问题描述)
I would like to flag that there are a number of scripts in your codebase that make use of
eval()
in ways that are unnecessary, overly liberal and possibly dangerous. Inppocr/postprocess/__init__.py
, for example,eval()
is used where a dictionary could easily perform the same functionality. Inppocr/data/imaug/__init__.py
, the patternfrom [script] import *
is used 10 times and theneval()
is used, which could easily have serious side-effects.I would recommend refactoring the codebase to cease using
eval()
.For additional information on why
eval()
is dangerous, see https://lucumr.pocoo.org/2011/2/1/exec-in-python/ and https://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html.🏃♂️ Environment (运行环境)
N/A
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
N/A
The text was updated successfully, but these errors were encountered: