Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

ToBoundSQL函数 不能过滤参数防止SQL注入吗? #49

Open
@xuyuri

Description

代码:
name := "cat;sleep(1)"
build := builder.MySQL()
sql, err := build.Select("*").From(table).Where(builder.Cond(builder.Eq{"name": name})).ToBoundSQL()

生成的sql语句是:SELECT * FROM t_tmp_info WHERE name='cat;sleep(1)'
并没有将sleep(1)过滤掉

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions