Escape all login and username characters in database

Display correctly usernames

(I hope not to have made mistakes)

git-svn-id: http://piwigo.org/svn/trunk@4304 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
Eric
2009-11-18 20:07:20 +00:00
parent 8a29965450
commit 1235bab527
19 changed files with 43 additions and 43 deletions
+4 -4
View File
@@ -523,8 +523,8 @@ SELECT DISTINCT image_id
}
$comm = array(
'author' => trim($params['author']),
'content' => trim($params['content']),
'author' => trim( stripslashes($params['author']) ),
'content' => trim( stripslashes($params['content']) ),
'image_id' => $params['image_id'],
);
@@ -700,7 +700,7 @@ SELECT id, date, author, content
)
)
{
$comment_post_data['author'] = $user['username'];
$comment_post_data['author'] = stripslashes($user['username']);
$comment_post_data['key'] = get_comment_post_key($params['image_id']);
}
@@ -1254,7 +1254,7 @@ function ws_session_getStatus($params, &$service)
{
global $user;
$res = array();
$res['username'] = is_a_guest() ? 'guest' : $user['username'];
$res['username'] = is_a_guest() ? 'guest' : stripslashes($user['username']);
foreach ( array('status', 'template', 'theme', 'language') as $k )
{
$res[$k] = $user[$k];