Subject: Hack to avoid spammers using the messaging system
We had a few cases where spammers used the "send email" function to spam registered forum members. As a quick fix I changed the function to give access to active members only (registered for more than 14 days, at least one post). This should keep most of the spammers out. At least for the messaging function.
--- cp.inc.php.bak 2011-01-09 13:40:32.000000000 +0100
+++ cp.inc.php 2011-01-09 13:40:46.000000000 +0100
@@ -1470,6 +1470,14 @@
$error .= $UNB_T['error.access denied'] . '<br />';
}
+
+ // ANDI
+ if( (time() - $UNB['LoginUser']->GetRegDate()) < 60*60*24*14 ||
+ !UnbGetLastPost("User=".(int) $UNB['LoginUserID']) ) {
+ $error .= $UNB_T['error.access denied'] . '<br />';
+ }
+
+
if (($_POST['id'] == '' || trim($_POST['Msg']) == ''))
{
$error .= $UNB_T['cp.error.form not complete'] . '<br />';
@@ -3085,8 +3093,19 @@
{
if ($_REQUEST['action'] == 'email' || $_REQUEST['action'] == 'sendemail')
{
- EMailForm($userid);
- UteRemember('userprofile.html', $TP);
+ // ANDI
+ if( (time() - $UNB['LoginUser']->GetRegDate()) < 60*60*24*14 ||
+ !UnbGetLastPost("User=".(int) $UNB['LoginUserID']) ) {
+
+
+ $TP['errorMsg'] .= $UNB_T['error.access denied'] . '<br />'.
+ 'You\'re not allowed to use the email system, yet.<br />';
+ $TP['headNoIndex'] = true;
+ }else{
+ EMailForm($userid);
+ UteRemember('userprofile.html', $TP);
+ }
+
}
elseif ($_REQUEST['action'] == 'emailsuccess')
{
+++ cp.inc.php 2011-01-09 13:40:46.000000000 +0100
@@ -1470,6 +1470,14 @@
$error .= $UNB_T['error.access denied'] . '<br />';
}
+
+ // ANDI
+ if( (time() - $UNB['LoginUser']->GetRegDate()) < 60*60*24*14 ||
+ !UnbGetLastPost("User=".(int) $UNB['LoginUserID']) ) {
+ $error .= $UNB_T['error.access denied'] . '<br />';
+ }
+
+
if (($_POST['id'] == '' || trim($_POST['Msg']) == ''))
{
$error .= $UNB_T['cp.error.form not complete'] . '<br />';
@@ -3085,8 +3093,19 @@
{
if ($_REQUEST['action'] == 'email' || $_REQUEST['action'] == 'sendemail')
{
- EMailForm($userid);
- UteRemember('userprofile.html', $TP);
+ // ANDI
+ if( (time() - $UNB['LoginUser']->GetRegDate()) < 60*60*24*14 ||
+ !UnbGetLastPost("User=".(int) $UNB['LoginUserID']) ) {
+
+
+ $TP['errorMsg'] .= $UNB_T['error.access denied'] . '<br />'.
+ 'You\'re not allowed to use the email system, yet.<br />';
+ $TP['headNoIndex'] = true;
+ }else{
+ EMailForm($userid);
+ UteRemember('userprofile.html', $TP);
+ }
+
}
elseif ($_REQUEST['action'] == 'emailsuccess')
{

splitbrain
Show profile
Link to this post
There's an update to UNB 1.6
after more than a year!
...
Or is that what 3-way merge is supposed to do? Just check out what