Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/16296] Adjust form token check for mark actions #5821

Open
wants to merge 1 commit into
base: 3.2.x
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -958,6 +958,11 @@ function handle_mark_actions($user_id, $mark_action)
{
case 'mark_important':

if (!check_form_key('ucp_pm_view'))
{
trigger_error('FORM_INVALID');
}

$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
SET pm_marked = 1 - pm_marked
WHERE folder_id = $cur_folder_id
@@ -209,14 +209,14 @@ function main($id, $mode)
$submit_mark = false;
}

if (($move_pm || $submit_mark) && !check_form_key('ucp_pm_view'))
{
trigger_error('FORM_INVALID');
}

// Move PM
if ($move_pm)
{
if (!check_form_key('ucp_pm_view'))
{
trigger_error('FORM_INVALID');
}

$move_msg_ids = (isset($_POST['marked_msg_id'])) ? $request->variable('marked_msg_id', array(0)) : array();
$cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);

@@ -32,7 +32,7 @@ function view_folder($id, $mode, $folder_id, $folder)
$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id']);
add_form_key('ucp_pm_view_folder');
add_form_key('ucp_pm_view');
if (!$submit_export)
{
@@ -199,7 +199,7 @@ function view_folder($id, $mode, $folder_id, $folder)
$enclosure = $request->variable('enclosure', '');
$delimiter = $request->variable('delimiter', '');
if (!check_form_key('ucp_pm_view_folder'))
if (!check_form_key('ucp_pm_view'))
{
trigger_error('FORM_INVALID');
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.