1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15687] Force supplied filename to be correct and modify route

PHPBB3-15687
This commit is contained in:
Marc Alexander
2023-06-28 10:51:22 +02:00
parent 5cb0b267d3
commit 4e9cf239ed
9 changed files with 21 additions and 17 deletions

View File

@@ -1115,7 +1115,7 @@ class acp_attachments
'U_FILE' => $this->controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $row['attach_id'],
'id' => (int) $row['attach_id'],
'filename' => $row['real_filename'],
]
),
@@ -1311,7 +1311,7 @@ class acp_attachments
'U_FILE' => $this->controller_helper->route(
'phpbb_storage_attachment',
[
'file' => $row['attach_id'],
'id' => $row['attach_id'],
'filename' => $row['real_filename'],
]
)

View File

@@ -2309,7 +2309,7 @@ class acp_users
'U_DOWNLOAD' => $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $row['attach_id'],
'id' => (int) $row['attach_id'],
'filename' => $row['real_filename'],
]
),

View File

@@ -1288,7 +1288,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$download_link = $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $attachment['attach_id'],
'id' => (int) $attachment['attach_id'],
'filename' => $attachment['real_filename'],
]
);
@@ -1301,7 +1301,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$inline_link = $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $attachment['attach_id'],
'id' => (int) $attachment['attach_id'],
'filename' => $attachment['real_filename'],
]
);
@@ -1319,7 +1319,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
$thumbnail_link = $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $attachment['attach_id'],
'id' => (int) $attachment['attach_id'],
'filename' => $attachment['real_filename'],
't' => 1,
]

View File

@@ -872,7 +872,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
->route(
'phpbb_storage_attachment',
[
'file' => (int) $attach_row['attach_id'],
'id' => (int) $attach_row['attach_id'],
'filename' => $attach_row['real_filename'],
]
);

View File

@@ -1719,7 +1719,7 @@ class parse_message extends bbcode_firstpass
$download_url = $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $new_entry['attach_id'],
'id' => (int) $new_entry['attach_id'],
'filename' => $new_entry['real_filename'],
]
);

View File

@@ -188,7 +188,7 @@ class ucp_attachments
'U_VIEW_ATTACHMENT' => $controller_helper->route(
'phpbb_storage_attachment',
[
'file' => (int) $row['attach_id'],
'id' => (int) $row['attach_id'],
'filename' => $row['real_filename'],
]
),