Menu

#2 Column Names Not Properly Quoted

open
nobody
None
5
2002-04-24
2002-04-24
No

The SQL that mod_auth_mysql (2.20) generates does not
properly quote the column names. For instance, if you
you name the groups column, 'group', it uses the
following SQL for group auth:

select count(*) from groups where
username='someusername' and (group='somepassword')

Which fails because 'group' is a reserved word. You
should be able to fix this by quoting the column names,
like:

select count(*) from groups where
'username'='someusername' and ('group'='somepassword')

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.