* Handles deleting messages from the trash folder without
* deleting subfolders.
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2024 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*/
+/** This is the empty_trash page */
+define('PAGE_NAME', 'empty_trash');
+
/**
* Include the SquirrelMail initialization file.
*/
/* get those globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
/* finished globals */
-$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+// first do a security check
+sqgetGlobalVar('smtoken', $submitted_token, SQ_GET, '');
+sm_validate_security_token($submitted_token, -1, TRUE);
+
+global $imap_stream_options; // in case not defined in config
+$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$mailbox = $trash_folder;
$boxes = sqimap_mailbox_list($imap_stream);
$location = get_location();
header ("Location: $location/left_main.php");
-?>
\ No newline at end of file