We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
koa2-note/demo/project/server/models/user-info.js
Line 23 in c667c4f
The code here will case SQL injection attack.
async getExistOne(options ) { let _sql = ` SELECT * from user_info where email="${options.email}" or name="${options.name}" // SQL injection attack limit 1` let result = await dbUtils.query( _sql ) if ( Array.isArray(result) && result.length > 0 ) { result = result[0] } else { result = null } return result }
Suggestion
SELECT * from user_info where email=? or name=? limit 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
koa2-note/demo/project/server/models/user-info.js
Line 23 in c667c4f
The code here will case SQL injection attack.
Suggestion
The text was updated successfully, but these errors were encountered: