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

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

@xuyuri

Description

@xuyuri

代码:
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)过滤掉

Metadata

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