mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
[feature/attach-dl] Send 404 if we get empty row from privmsg|posts|topic table
PHPBB3-11042
This commit is contained in:
@@ -366,6 +366,12 @@ else
|
|||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (empty($row))
|
||||||
|
{
|
||||||
|
send_status_line(404, 'Not Found');
|
||||||
|
trigger_error('ERROR_NO_ATTACHMENT');
|
||||||
|
}
|
||||||
|
|
||||||
$bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
|
$bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
|
||||||
$clean_name = current($row);
|
$clean_name = current($row);
|
||||||
$clean_name = rawurlencode(str_replace($bad_chars, '_', strtolower($clean_name)));
|
$clean_name = rawurlencode(str_replace($bad_chars, '_', strtolower($clean_name)));
|
||||||
|
Reference in New Issue
Block a user