diff -r a78b0798a116 -r 7e6537fd4730 plugins/PrivateMessages.php --- a/plugins/PrivateMessages.php Tue Nov 16 12:44:22 2010 -0500 +++ b/plugins/PrivateMessages.php Tue Jul 12 22:13:37 2011 -0400 @@ -96,6 +96,7 @@ die_friendly('Message status', '
Your message has been moved to the folder "'.$fname.'".
'); break; case 'Delete': + csrf_request_confirm(); $id = $argv[1]; if(!preg_match('#^([0-9]+)$#', $id)) die_friendly('Message error', 'Invalid message ID
'); $q = $db->sql_query('SELECT message_to FROM '.table_prefix.'privmsgs WHERE message_id='.$id.''); @@ -111,6 +112,7 @@ if($argv[1]=='Send' && isset($_POST['_send'])) { // Check each POST DATA parameter... + csrf_request_confirm(); if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', 'Please enter the username to which you want to send your message.
'); if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', 'Please enter a subject for your message.
'); if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', 'Please enter a message to send.
'); @@ -133,6 +135,7 @@ return; } elseif($argv[1]=='Send' && isset($_POST['_savedraft'])) { // Check each POST DATA parameter... + csrf_request_confirm(); if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', 'Please enter the username to which you want to send your message.
'); if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', 'Please enter a subject for your message.
'); if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', 'Please enter a message to send.
'); @@ -192,11 +195,12 @@Compose new private message | |
---|---|
To: Separate multiple names with a single comma; you can send this message to up to users. | username_field('to', (isset($_POST['_savedraft'])) ? $_POST['to'] : $to ); ?> |
Subject: | |
Message: | |
To: Separate multiple names with a single comma; you can send this message to up to users. | username_field('to', (isset($_POST['_savedraft'])) ? htmlspecialchars($_POST['to']) : $to ); ?> |
Subject: | |
Message: | |
Please enter the username to which you want to send your message.
'); if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', 'Please enter a subject for your message.
'); if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', 'Please enter a message to send.
'); @@ -231,6 +236,7 @@ return; } elseif(isset($_POST['_savedraft'])) { // Check each POST DATA parameter... + csrf_request_confirm(); if(!isset($_POST['to']) || ( isset($_POST['to']) && $_POST['to'] == '')) die_friendly('Sending of message failed', 'Please enter the username to which you want to send your message.
'); if(!isset($_POST['subject']) || ( isset($_POST['subject']) && $_POST['subject'] == '')) die_friendly('Sending of message failed', 'Please enter a subject for your message.
'); if(!isset($_POST['message']) || ( isset($_POST['message']) && $_POST['message'] == '')) die_friendly('Sending of message failed', 'Please enter a message to send.
'); @@ -251,6 +257,7 @@ userprefs_show_menu(); echo '