Skip Menu |

This queue is for tickets about the Apache2-AuthCookieDBI CPAN distribution.

Report information
The Basics
Id: 79341
Status: resolved
Estimated: 1 hour (60 min)
Worked: 20 min
Priority: 0/
Queue: Apache2-AuthCookieDBI

People
Owner: matisse [...] spamcop.net
Requestors: ccolumbu [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.16
Fixed in: 2.17



Subject: Table column names may confict with sql key words
We used the column name "group" for our group column. However MySQL can not run the query because "group" is a sql key word. Adding backticks around the column names protects them from this error. Current SQL (near line 943, but really any sql column names should be quoted): SELECT $c{'DBI_GroupUserField'} FROM $c{'DBI_GroupsTable'} WHERE $c{'DBI_GroupField'} = ? AND $c{'DBI_GroupUserField'} = ? Safer written as: SELECT $c{'DBI_GroupUserField'} FROM $c{'DBI_GroupsTable'} WHERE `$c{'DBI_GroupField'}` = ? AND `$c{'DBI_GroupUserField'}` = ? This fixed the error for me.