- bug 107 fixed : "crash when virtual category name contains a quote". In

fact, the problem was in log line insertion. Category name must be
  "addslashed".


git-svn-id: http://piwigo.org/svn/branches/branch-1_4@784 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2005-05-02 20:44:27 +00:00
parent 600c108a1f
commit 39e65897dc

View File

@@ -340,11 +340,11 @@ INSERT INTO '.HISTORY_TABLE.'
(date,login,IP,file,category,picture)
VALUES
(NOW(),
\''.(($user['id'] == 2) ? 'guest' : $user['username']).'\',
\''.(($user['id'] == 2) ? 'guest' : addslashes($user['username'])).'\',
\''.$_SERVER['REMOTE_ADDR'].'\',
\''.$file.'\',
\''.$category.'\',
\''.$picture.'\')
\''.addslashes($file).'\',
\''.addslashes($category).'\',
\''.addslashes($picture).'\')
;';
pwg_query($query);
}