]> git.pld-linux.org Git - packages/apache1-mod_pointer.git/blame - apache1-mod_pointer-mysql.patch
- use apache1(EAPI) for runtime dep
[packages/apache1-mod_pointer.git] / apache1-mod_pointer-mysql.patch
CommitLineData
a126b04f
ER
1mod_real_query() is for binary data. and using MAX_QUERY_LENGTH will also pass
2uninitialized buffer to mysql server which will result syntax error
3
4so should pass there strlen(query) instead, but lets rather use mysql_query()
5which will use \0 terminated string.
6
7also the patch includes query into apache error log if the query failed.
8
9--- mod_pointer-0.8/mod_my_pointer.c 2002-06-18 18:33:13.000000000 +0300
10+++ mod_pointer-0.8-mysql/mod_my_pointer.c 2006-04-12 20:14:39.662876705 +0300
11@@ -395,9 +395,9 @@
12 cfg->mysqlurlfield, cfg->mysqlframefield, cfg->mysqltitlefield,
13 cfg->mysqlpassargsfield, cfg->mysqlptrtable, cfg->mysqlhostfield, pointer_host);
14
15- if (mysql_real_query(mysql_handle, query, MAX_QUERY_LENGTH) != 0) {
16+ if (mysql_query(mysql_handle, query) != 0) {
17 ap_log_error (APLOG_MARK, APLOG_ERR, r->server,
18- "[mod_pointer]: MySQL error %s: %s", mysql_error(mysql_handle), r->uri);
19+ "[mod_pointer]: MySQL error %s: %s: [%s]", mysql_error(mysql_handle), r->uri, query);
20 return SERVER_ERROR;
21 }
22
This page took 0.078445 seconds and 4 git commands to generate.