mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[ticket/security/279] Use rawurlencode for escaping smilie URLs
SECURITY-279
This commit is contained in:
parent
d8ac6f575e
commit
c4f42c1573
1 changed files with 2 additions and 2 deletions
|
@ -654,7 +654,7 @@ class acp_icons
|
||||||
{
|
{
|
||||||
$replace_sql = ($mode == 'smilies') ? $code : $img;
|
$replace_sql = ($mode == 'smilies') ? $code : $img;
|
||||||
$sql = array(
|
$sql = array(
|
||||||
$fields . '_url' => utf8_substr(htmlspecialchars($img, ENT_COMPAT), 0, 50),
|
$fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
|
||||||
$fields . '_height' => (int) $height,
|
$fields . '_height' => (int) $height,
|
||||||
$fields . '_width' => (int) $width,
|
$fields . '_width' => (int) $width,
|
||||||
'display_on_posting' => (int) $display_on_posting,
|
'display_on_posting' => (int) $display_on_posting,
|
||||||
|
@ -676,7 +676,7 @@ class acp_icons
|
||||||
++$order;
|
++$order;
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
$fields . '_url' => utf8_substr(htmlspecialchars($img, ENT_COMPAT), 0, 50),
|
$fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
|
||||||
$fields . '_height' => (int) $height,
|
$fields . '_height' => (int) $height,
|
||||||
$fields . '_width' => (int) $width,
|
$fields . '_width' => (int) $width,
|
||||||
$fields . '_order' => (int) $order,
|
$fields . '_order' => (int) $order,
|
||||||
|
|
Loading…
Add table
Reference in a new issue