开发者

Kohana 3.1 ORM Security Question

开发者 https://www.devze.com 2023-03-09 21:28 出处:网络
Are all values escaped when using the ORM Module? For example, if I have: $user->where(\'username\', \'LIKE\', \'%\' . $this->request-post(\'user\') . \'%\')->find_all()

Are all values escaped when using the ORM Module?

For example, if I have:

$user->where('username', 'LIKE', '%' . $this->request-post('user') . '%')->find_all()

Is this 开发者_如何学Gosafe?


Yes, ORM uses the query builder, which automatically escapes all values.

Creating queries dynamically using objects and methods allows queries to be written very quickly in an agnostic way. Query building also adds identifier (table and column name) quoting, as well as value quoting.

0

精彩评论

暂无评论...
验证码 换一张
取 消