Aleksander Machniak
2013-04-05 4dfae96dcdfba93a8b03db2d0422766b20adf77d
Fix copying messages to a folder with "empty" name e.g. "0", better error handling
3 files modified
14 ■■■■■ changed files
program/steps/mail/copy.inc 4 ●●●● patch | view | raw | blame | history
program/steps/mail/mark.inc 8 ●●●● patch | view | raw | blame | history
program/steps/mail/move_del.inc 2 ●●●●● patch | view | raw | blame | history
program/steps/mail/copy.inc
@@ -24,7 +24,7 @@
  return;
// move messages
if (!empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) {
if (!empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) {
    $uids = get_input_value('_uid', RCUBE_INPUT_POST);
    $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true);
    $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true);
@@ -47,7 +47,7 @@
}
// unknown action or missing query param
else {
    exit;
    $OUTPUT->show_message('internalerror', 'error');
}
// send response
program/steps/mail/mark.inc
@@ -125,9 +125,9 @@
      }
    }
  }
  $OUTPUT->send();
}
else {
    $OUTPUT->show_message('internalerror', 'error');
}
exit;
$OUTPUT->send();
program/steps/mail/move_del.inc
@@ -74,6 +74,8 @@
}
// unknown action or missing query param
else {
    $OUTPUT->show_message('internalerror', 'error');
    $OUTPUT->send();
    exit;
}