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

format code and change the database table name, also fix the sql inje… #13

Merged
merged 1 commit into from
Aug 19, 2019
Merged

format code and change the database table name, also fix the sql inje… #13

merged 1 commit into from
Aug 19, 2019

Conversation

yihong0618
Copy link
Contributor

@yihong0618 yihong0618 commented Aug 19, 2019

因为用的sql拼接的方式查询(很容易暴露数据库被攻击),因此很容易被sql注入, 因为整个改的话改动较大,因此用正则过滤的方式简单解决sql注入的问题。
sql注入方式如下:
https://www.printf520.com:8080/GetTypeInfo?id=12+or+1=1+union+select+user+as+str+from+mysql.user++order+by+str+desc

@timeromantic
Copy link
Member

感谢你提交的代码和说明的问题,我写的db组件未过滤注入情况,你提交的正则过滤是很有必要的。后期后把db组件里面的过滤注入加上的。

@timeromantic timeromantic merged commit a7189f1 into tophubs:master Aug 19, 2019
@yihong0618
Copy link
Contributor Author

不客气~~

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.

None yet

2 participants