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

传参及sql注入问题 #88

Open
tly1995 opened this issue Aug 26, 2024 · 0 comments
Open

传参及sql注入问题 #88

tly1995 opened this issue Aug 26, 2024 · 0 comments

Comments

@tly1995
Copy link

tly1995 commented Aug 26, 2024

我有一个sql,条件是 time <= DATE_SUB(NOW,INTERVAL '30' MINUTE) ,30需要带引号才行必须是字符串,int类型无法运行(和mysql不同),此时我用fenix写的语法为and time <=DATE_SUB(NOW,INTERVAL #{num} MINUTE) ,,num传入字符串30("30"),但是这样书写无法运行,必须改成‘${num}’才能正常运行,但是使用$传参会有sql注入风险,我应该如何正确接参

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

No branches or pull requests

1 participant