We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bf190e commit fae3d85Copy full SHA for fae3d85
README.markdown
@@ -255,6 +255,17 @@ Sets whether to use the "compact-arrays" structure for the resultsets returned b
255
256
This method was first introduced in the `v0.09` release.
257
258
+SQL Literal Quoting
259
+===================
260
+
261
+It is always important to quote SQL literals properly to prevent SQL injection attacks. You can use the
262
+[ngx.quote_sql_str](http://wiki.nginx.org/HttpLuaModule#ngx.quote_sql_str) function provided by ngx_lua to quote values.
263
+Here is an example:
264
265
+ local name = ngx.unescape_uri(ngx.var.arg_name)
266
+ local quoted_name = ngx.quote_sql_str(name)
267
+ local sql = "select * from users where name = " .. name
268
269
Debugging
270
=========
271
0 commit comments