Changeset 1177

Show
Ignore:
Timestamp:
10/20/06 01:36:05 (2 years ago)
Author:
jm3
Message:

new spam-fighting code, including:

* converted login and signup forms to explicit POSTs (not GETs) so they can't be automated
* confirm new accounts via valid email and lock the account until confirmed
* add a one-click "Report this user as a spammer" button for all users
* add a one-click "Snuff this user instantly" button for superusers
* log the IP address of all new accounts for 1 week
* disallow creating > 1 account per IP address per week
* lock out unused accounts after 90 days
* add a bulk-snuffer to snuff whole batches of spammers at once

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/admin/index.php

    r993 r1177  
    3232        <b>TOOLS</b>:<br /> 
    3333        <ul> 
     34                <li><a href="/admin/expire-old-users">expire old users</a></li> 
     35                <li><a href="/admin/snuff">snuff a user</a></li> 
     36                <li><a href="/admin/bulk-snuff">snuff a batch of users</a></li> 
     37                <li><a href="/admin/clear-logged-IPs">clear logged IP addresses</a></li> 
    3438                <li><a href="/admin/FUQ">FUQ management &amp; testing</a><br /></li> 
    3539                <li><a href="http://six.pairlist.net/mailman/admin/gourmands">administer the FML mailing list</a><br /></li> 
  • feedmelinks/categorize.php

    r1045 r1177  
    6262 
    6363<div class="warning" style="text-align: center;"> 
     64<h1>Double-Link!</h1> 
    6465        <h3> 
    65         <a href="/<%= $li['id'] %>"><%= $li['name'] %></a> 
     66        Link: <a href="/<%= $li['id'] %>"><%= $li['name'] %></a> 
    6667        <p /> 
    6768        <img src="/img/doublemint-twins.jpg" border="2" /> 
  • feedmelinks/import/present-clean-pre-flight-input.inc.php

    r1166 r1177  
    1919                new tags to be created: 
    2020        </div> 
     21        <form name="tags"> 
    2122<% 
    2223        for( $i = 0; $i < $ts; $i++ ) { 
     
    2728                } else { 
    2829                        ++$num_tags; 
    29                         echo row_wrap( " <span class='hot'>$line</span>", ($i % 2 == 0) ? 1 : 0 ); 
     30                        echo row_wrap( " <span class='hot'><label><!-- input type='checkbox' checked='checked' name='tag' value='$line' /-->Create tag: </label> $line</span>", ($i % 2 == 0) ? 1 : 0 ); 
    3031                } 
    3132                echo "</div>\n"; 
    3233        } 
    3334%> 
     35</form> 
    3436</div> 
    3537 
  • feedmelinks/import/upload-form.inc.php

    r858 r1177  
    1010        &nbsp; 
    1111 
    12         <input class="default button" type="submit" value="Start Upload" /> 
     12        <input style="padding: 0.4em; font-size: 150%;" class="default button" type="submit" value="Start Upload" /> 
    1313</form> 
    1414 
  • feedmelinks/login.php

    r1163 r1177  
    22        # $Id$  
    33 
    4         $debug = 0; 
     4        #$debug = 0; 
    55 
    66        include_once( "modules/utils.inc.php" ); 
     
    3232                                $dbUserId = mysql_result($q,$i,"userId"); 
    3333                                if( ! strncmp( urlencode( $password ), $dbPassword, 16 )) { 
    34                                         $authenticated = 1; 
    35                                         $sessionUserId = $dbUserId; 
    36  
    37                                         setCookie( 'c_uid', $dbUserId, time()+60*60*24*69, '/', get_cookie_domain() ); 
    38                                         setCookie( 'c_pass_token', md5( getPasswdForUser( $sessionUserId )), time()+60*60*24*69, '/', get_cookie_domain() ); 
    39  
    40                                         if( $debug ) { 
    41                                                 e( "auth challenge successful, authenticating you as $sessionUserId" ); 
    42                                         } 
    43                                          
    44                                         if( $debug ) { 
    45                                                 e( "just set cookies:" ); 
    46                                                 e( " setCookie( 'c_uid', $dbUserId, " . (time()+60*60*24*69) . ", '/', " . get_cookie_domain() . " );" ); 
    47                                                 e( " setCookie( 'c_pass_token', " . (md5( getPasswdForUser( $sessionUserId ))) . ", " . (time()+60*60*24*69) . ", '/', " . get_cookie_domain() . " );" ); 
    48                                         } 
     34                                        if( user_enabled( $userId )) { 
     35 
     36                                                $authenticated = 1; 
     37                                                $sessionUserId = $dbUserId; 
     38                                                setCookie( 'c_uid', $dbUserId, time()+60*60*24*69, '/', get_cookie_domain() ); 
     39                                                setCookie( 'c_pass_token', md5( getPasswdForUser( $sessionUserId )), time()+60*60*24*69, '/', get_cookie_domain() ); 
     40                                                if( $debug ) { e( "auth challenge successful, authenticating you as $sessionUserId" ); } 
     41                                                 
     42                                                if( $debug ) { 
     43                                                        e( "just set cookies:" ); 
     44                                                        e( " setCookie( 'c_uid', $dbUserId, " . (time()+60*60*24*69) . ", '/', " . get_cookie_domain() . " );" ); 
     45                                                        e( " setCookie( 'c_pass_token', " . (md5( getPasswdForUser( $sessionUserId ))) . ", " . (time()+60*60*24*69) . ", '/', " . get_cookie_domain() . " );" ); 
     46                                                } 
    4947 
    5048%> 
     
    7977                                                } 
    8078                                        } 
     79                                        } else { 
     80                                                log_mesg_to( "WARN. attempted login from invalidated user $userId", "global" ); 
     81                                                warn( "Your account is temporarily DISABLED. Check your email for a validation code."); 
     82                                                return; 
     83                                        } 
    8184                                } else { 
    8285                                        if( $debug ) { 
     
    118121                                        } else { 
    119122 
     123                                                log_mesg_to( "successfully created new user $userId", "global" ); 
     124 
    120125                                                $shouldShowLoginForm = 0; 
    121126                                                $shouldShowCreateForm = 0; 
     
    124129 
    125130                                                        $headers = ""; 
     131                                                        $code = get_validation_code( $userId ); 
    126132                                                        $subject = "Welcome, Linkster!"; 
    127133                                                        $body    = "Welcome to Feed Me Links! 
     
    129135Your feedmelinks user name is: $userId. 
    130136Your feedmelinks password is: $password 
     137 
     138To start using Feed Me Links, you need to validate your account by clicking: http://feedmelinks.com/diespammersdie/?user=$userId&code=$code 
    131139 
    132140Go to $site to log in and start sharing links. 
     
    200208 
    201209<br /> 
    202 <form name="login_form" action="<%= $page %>"
     210<form name="login_form" action="<%= $page %>" method="POST"
    203211        <input type="hidden" name="op" value="login" /> 
    204212        <input type="hidden" name="debug" value="<%= $debug %>" /> 
     
    264272<br /> 
    265273<br /> 
    266 <!-- <img src="http://www.klot.net/pictures/modifica/modifi07.jpg" /> --> 
    267 <br /> 
    268 <!-- "The Mentalist, from his pulpit onstage..." --> 
     274<br /> 
     275 
    269276<% } else if( $shouldShowCreateForm ) { 
    270277        if( ! $errors )  
     
    304311                                errors += "Please double-check your email address.<br />\n"; 
    305312                } 
    306  
    307313                 
    308                 if( ! errors ) 
     314                if( ! errors ) { 
    309315                        return true; 
    310                 else { 
     316                } else { 
    311317                        f.errors.value = errors; 
    312318                        //return false; 
     
    317323</script> 
    318324 
     325<%= $debug == 1 ? "<h1 style='color: red;'>* * * DEBUG IS ON * * *</h1>" : "" %> 
    319326<% if( $errors ) { %> 
    320327 
     
    326333 
    327334<% } %> 
    328 <form name="create_account_form" action="<%= $page %>" method="get" onSubmit="return(validateForm(this));"> 
    329 <input type="hidden" name="op" value="createAccount" /> 
    330 <input type="hidden" name="errors" value="" /> 
     335 
     336<form name="create_account_form" action="<%= $page %>" method="POST" onSubmit="return(validateForm(this));"> 
     337        <input type="hidden" name="debug" value="<%= $debug %>" /> 
     338        <input type="hidden" name="op" value="createAccount" /> 
     339        <input type="hidden" name="errors" value="" /> 
    331340<table> 
    332341        <tr> 
  • feedmelinks/modules/my-recent.inc.php

    r672 r1177  
    88        $con_myRecent = mysql_connect(); 
    99        mysql_selectdb( getDBName() ); 
    10         $MAX_LINKS = $max ? $max : 15; 
     10        $MAX_LINKS = 15; 
    1111 
    1212        if( $u || $who ) { 
     
    3939<% if( $numLinks > 0 ) { 
    4040        $qs = $viewedByOwner  
    41                 ? "SELECT * from links WHERE submitter='$user' ORDER BY createDate DESC
    42                 : "SELECT * from links WHERE submitter='$user' AND isPrivate is NULL ORDER BY createDate DESC"; 
     41                ? "SELECT * from links WHERE submitter='$user' ORDER BY createDate DESC LIMIT $MAX_LINKS
     42                : "SELECT * from links WHERE submitter='$user' AND isPrivate is NULL ORDER BY createDate DESC LIMIT $MAX_LINKS"; 
    4343        $q = mysql_query( $qs ); 
    4444        if( $q ) { 
  • feedmelinks/modules/recent-with-times.inc.php

    r554 r1177  
    4545        } 
    4646        </script> 
    47         <form name="cruiser_form"
     47        <form name="cruiser_form" action="/link-cruiser"
    4848                <input type="hidden" name="start" value="<%= $start %>"> 
    4949                <input type="button" value="&laquo; BACKWARD!" onClick="go( -1 );"> 
  • feedmelinks/modules/utils.inc.php

    r1173 r1177  
    44include_once( "env.inc.php" ); 
    55include( get_root() . "/modules/prep-cache.inc.php" ); 
     6 
     7function progress( $mesg ) { 
     8ob_start(); 
     9%> 
     10<div class="progress"> 
     11        <h3><%= $mesg %></h3> 
     12        <img src="/img/aqua-progressbar.gif" /> 
     13</div> 
     14<% 
     15return ob_get_clean(); 
     16} 
     17 
     18function fire( $sub, $mesg ) { 
     19  $success = mail( get_maintainer_email(), "WHAT THE CHOPSTICKS!?! $sub", $mesg, get_mail_headers()); 
     20} 
     21 
     22function report_spammer( $alleged_spammer, $reporter ) { 
     23  $body = " 
     24 
     25  $alleged_spammer was reported as a spammer (gasp!). 
     26  http://feedmelinks.com/u/$alleged_spammer 
     27 
     28-- 
     29 
     30reported by $reporter 
     31http://feedmelinks.com/u/$reporter 
     32 
     33snuff them? 
     34http://feedmelinks.com/admin/snuff?user=$alleged_spammer 
     35"; 
     36  $headers = get_mail_headers(); 
     37  $success = mail( get_maintainer_email(), "Potential spammer: $alleged_spammer reported by $reporter", $body, $headers); 
     38 
     39        return "Filed Successfully!"; 
     40  if( $success ) 
     41                log_mesg_to( "user $alleged_spammer reported as a spammer by $reporter", "global" ); 
     42} 
     43 
     44function user_enabled( $user ) { 
     45        $disabled = getFieldForUser( $user, "disabled" ); 
     46        return (!$disabled || $disabled == "NULL") ? true : false; 
     47} 
     48 
     49function enable_user( $user ) { 
     50        $q = run_query( getQuery( "enable_user", $user )); 
     51        return "success"; # FIXME: replace with a real status 
     52} 
     53 
     54function disable_user( $user ) { 
     55        $q = run_query( getQuery( "disable_user", $user )); 
     56        log_mesg_to( "disabled user $user", "global" ); 
     57        return "disabled user"; # FIXME: replace with a real status 
     58} 
     59 
     60function snuffed( $u ) { 
     61        return getFieldForUser( $u, "snuffed" ); 
     62} 
     63 
     64function snuff_user( $user ) { 
     65        if( is_privileged_importer( $user ) || isSuperUser( $user )) 
     66                return "you cannot snuff a superuser."; 
     67 
     68        # disable their login  
     69        disable_user( $user ); 
     70 
     71        # reset their password to garbage 
     72        $snuff_pass = get_validation_code( $user . "-SNUFFED" ); 
     73        $q = run_query( getQuery( "snuff_pass", $user, $snuff_pass )); 
     74 
     75        # mark all their tags private 
     76        $q = run_query( getQuery( "privatize_tags", $user )); 
     77 
     78        # mark all their links private 
     79        $q = run_query( getQuery( "privatize_links", $user )); 
     80 
     81        # make their user directory un-readable 
     82        $f = get_user_folder( $user ); 
     83        if( is_dir( $f )) { 
     84                shell_exec( "cp " . get_webserver_root() . "/admin/.htaccess $f/" ); 
     85        } 
     86 
     87        # mark them as snuffed 
     88        $q = run_query( getQuery( "snuff_user", $user )); 
     89 
     90        log_mesg_to( "snuffed out user $user", "global" ); 
     91        echo get_snuffed_mesg(); 
     92%> 
     93 
     94        <a href="/u/<%= $user %>">Done. Check your work</a>. 
     95 
     96<% 
     97        return "success."; 
     98} 
     99 
     100function get_snuffed_mesg() { 
     101        ob_start(); 
     102%> 
     103        <ol> 
     104                <li>we changed their password, </li> 
     105                <li>disabled their ability to log in,</li> 
     106                <li>hid their tags,</li> 
     107                <li>hid their links,</li> 
     108                <li>censored their profile page,</li> 
     109                <li>locked their user directory, and</li> 
     110                <li>marked them as a snuffed user</li> 
     111        </ol> 
     112<% 
     113        return ob_get_clean(); 
     114} 
     115 
     116function relight_user( $user ) { 
     117        return "not yet implemented"; 
     118        log_mesg_to( "re-lit user $user", "global" ); 
     119} 
     120 
     121function get_salt( $s ) { 
     122        return "40ape"; # FIXME: hardcoded few now 
     123} 
     124 
     125function get_validation_code( $user ) { 
     126        return md5( $user . get_salt( $user )); 
     127} 
    6128 
    7129function log_mesg_to( $mesg, $to ) { 
     
    17139} 
    18140 
     141function get_ip() { 
     142        return getenv(HTTP_X_FORWARDED_FOR) ? getenv(HTTP_X_FORWARDED_FOR) : getenv(REMOTE_ADDR); 
     143} 
    19144 
    20145function notify_added_as_peep( $u, $by ) { 
     
    106231        if( ! $q ) 
    107232                return undefined; 
    108          
    109         $d0 = mysql_result($q,0); 
    110         $d1 = mysql_result($q,1); 
     233        return diff_driver( mysql_result($q,0), mysql_result($q,1)); 
     234
     235 
     236function diff_driver( $d0, $d1 ) { 
    111237        $diff = round( diff_in_secs( $d0, $d1 ) / 60 / 60 / 24, 4); 
    112238        return $diff > 0 ? $diff : 0; 
     239} 
     240 
     241function get_now_db() { 
     242        return get_simple_rs( "SELECT now() AS now" ); 
    113243} 
    114244 
     
    832962function get_recent_for_user_footer_cb() { return "<a href='/u/" . func_get_arg( 0 ) . "'>See more of " . func_get_arg( 0 ) . "'s links...</a>";  } 
    833963 
     964function get_contacts_links_rss( $users, $links_per_user ) { 
     965 
     966  #ksort($users); 
     967  foreach ($users as $user => $junk) { 
     968                echo "\n$user"; 
     969        } 
     970 
     971return; 
     972 
     973 
     974        $n = 3; # FIXME: number of users 
     975        for( $i = 0; $i < $n; $i++ ) { 
     976%> 
     977 
     978                <item> 
     979                        <title>LINK_TITLE</title> 
     980                        <link>LINK_URL</link> 
     981                        <description>added by: LINK_USERNAME</description> 
     982                        <guid isPermaLink="true">http://LINK_URL</guid> 
     983                        <content:encoded> 
     984                                LINK_DESCRIPTION 
     985                        </content:encoded> 
     986                        <dc:subject> 
     987                                Tagged with:  
     988                                        <a rel="tag" href="LINK_TAG_URL_1">LINK_TAG_NAME_1</a> 
     989                                        <a rel="tag" href="LINK_TAG_URL_2">LINK_TAG_NAME_2</a> 
     990                        </dc:subject> 
     991                        <dc:date>LINK_DC_DATE</dc:date> 
     992                        </item> 
     993                </channel> 
     994<% 
     995        } 
     996} 
     997 
    834998function get_contacts_links_html( $show_summary ) { 
    835999        $cache = get_cache(); 
     
    14171581                        LEFT JOIN linksCategoriesXRef ON links.ID = linksCategoriesXRef.linkID 
    14181582                        WHERE linksCategoriesXRef.linkID IS NULL "; 
     1583         
     1584        } else if( $argWhichQuery  == "log_ip" ) { 
     1585          return " 
     1586                INSERT INTO spam_IPs VALUES ( '" . urlencode($args[1]) . "', '" . urlencode($args[2]) . "', '" . urlencode($args[3]) . "', NULL, NULL ) "; 
     1587 
     1588        } else if( $argWhichQuery  == "most_recent_link_for_user" ) { 
     1589                return " 
     1590                SELECT createDate, max(id) AS m FROM links WHERE submitter = '" . urlencode($args[1]) . "' group by submitter, createDate order by m desc limit 1;"; 
     1591         
     1592        } else if( $argWhichQuery  == "multiple_accounts_from_this_ip" ) { 
     1593                return " 
     1594                SELECT * FROM spam_IPs WHERE ip = '" . urlencode($args[1]) . "';"; 
     1595 
     1596        } else if( $argWhichQuery  == "enable_user" ) { 
     1597                return " 
     1598                UPDATE linksUsers SET disabled = 'NULL' WHERE userid = '" . urlencode($args[1]) . "';"; 
     1599         
     1600        } else if( $argWhichQuery  == "disable_user" ) { 
     1601                return " 
     1602                UPDATE linksUsers SET disabled = 1 WHERE userid = '" . urlencode($args[1]) . "';"; 
     1603         
     1604        } else if( $argWhichQuery  == "snuff_pass" ) { 
     1605                return " 
     1606                UPDATE linksUsers SET password = '" . urlencode($args[2]) . "' WHERE userid = '" . urlencode($args[1]) . "';"; 
     1607         
     1608        } else if( $argWhichQuery  == "snuff_user" ) { 
     1609                return " 
     1610                UPDATE linksUsers SET snuffed = 1 WHERE userid = '" . urlencode($args[1]) . "';"; 
     1611         
     1612        } else if( $argWhichQuery  == "privatize_tags" ) { 
     1613                return " 
     1614                UPDATE linksGroups SET isPrivate = 1 WHERE userid = '" . urlencode($args[1]) . "';"; 
     1615         
     1616        } else if( $argWhichQuery  == "privatize_links" ) { 
     1617                return " 
     1618                UPDATE links SET isPrivate = 1 WHERE submitter = '" . urlencode($args[1]) . "';"; 
     1619         
     1620        } else if( $argWhichQuery  == "all_users" ) { 
     1621                return " 
     1622                SELECT distinct(userid) FROM linksUsers WHERE disabled is NULL;"; 
    14191623 
    14201624        } else if( $argWhichQuery  == "get_fuq" ) { 
     
    18992103function getColorKey() { 
    19002104        return; 
     2105} 
     2106 
     2107# judge, jury, and executioner 
     2108function isJJE( $u ) { 
     2109        if( $u == "jm3" ) 
     2110                return true; 
     2111        else 
     2112                return false; 
    19012113} 
    19022114 
     
    21632375 
    21642376function addUser( $argUserId, $argEmail, $argPassword, $argName ) { 
     2377 
     2378        # check to see if weve seen any new accounts from this IP recently 
     2379        $ip = get_ip(); 
     2380        $q = run_query( getQuery( "multiple_accounts_from_this_ip", $ip )); 
     2381 
     2382        $num_rows = mysql_num_rows($q); 
     2383        if( $num_rows > 1 ) { 
     2384                fire( "Possible spammer-birth in progress!", "Multiple accounts being requested from the same IP ($ip) -- user: $argUserId, $argEmail" ); 
     2385                log_mesg_to( "WARN. potential spammer $argUserId ($argEmail) creating multiple accounts from the same IP", "global" ); 
     2386                $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 
     2387                return; 
     2388        } else { 
     2389                # if not, log this IP in case we see it again: 
     2390                $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 
     2391        } 
     2392 
    21652393        $userId   = urlencode( $argUserId ); 
    21662394        $email    = urlencode( $argEmail ); 
     
    21682396        $name     = urlencode( $argName ); 
    21692397 
    2170         $qs = "INSERT INTO linksUsers VALUES(NULL,'$userId','$email', '$password', '$name','', 2);"; 
     2398        $qs = "INSERT INTO linksUsers VALUES(NULL,'$userId','$email', '$password', '$name','', 2, 1, NULL);"; 
    21712399 
    21722400        l( "new_user: $argUserId, $argEmail" ); 
     
    26372865        mysql_selectdb( getDBName() ); 
    26382866         
    2639         $qs = "SELECT password from linksUsers WHERE userid = '$argUser'"; 
     2867        $qs = "SELECT password FROM linksUsers WHERE userid = '$argUser'"; 
    26402868        $q = mysql_query( $qs ); 
    26412869        if( $q ) 
     
    26952923        mysql_selectdb( getDBName() ); 
    26962924        $qs = "SELECT $field from links WHERE ID = $argId"; 
     2925        $q = mysql_query( $qs ); 
     2926        if( $q ) 
     2927                $numRows = mysql_num_rows($q); 
     2928        conClose(); 
     2929        if( $numRows ) 
     2930                return mysql_result($q, $i, $field); 
     2931} 
     2932 
     2933function getFieldForUser( $user, $field ) { 
     2934        mysql_connect(); 
     2935        mysql_selectdb( getDBName() ); 
     2936        $qs = "SELECT $field from linksUsers WHERE userid = '$user'"; 
    26972937        $q = mysql_query( $qs ); 
    26982938        if( $q ) 
  • feedmelinks/modules/view-link.inc.php

    r889 r1177  
    1616                $createDate = formatTS( $link_info['createDate'] ); 
    1717                $isPrivate = $link_info['isPrivate']; 
     18 
     19                if( $isPrivate && $submitter != $u ) 
     20                        return; 
    1821                         
    1922                $numGroups = 0; 
     
    2427 
    2528%> 
    26  
    2729 
    2830<div class="attention" style="width: 45em;"> 
  • feedmelinks/style/new-portal.css

    r1171 r1177  
     1.progress { 
     2        background-color: white; 
     3        width: 300px; 
     4        text-align: center; 
     5        padding: 10px; 
     6        border: 1px solid gray; 
     7} 
     8 
    19.b { 
    210        font-weight: bold; 
     
    715        font-weight: bold; 
    816        color: black; 
     17} 
     18 
     19/* for buttons: */ 
     20.big { 
     21        padding: 0.4em; 
     22        font-size: 150%; 
    923} 
    1024 
  • feedmelinks/thanks.php

    r1163 r1177  
    5555 
    5656                        <div id="controls"> 
    57                                 <input type="submit" value="Log in to get started &raquo;" class="idiotproof" /> 
     57                                Please check your email nobox to validate your account and start linking. 
    5858                        </div> 
    5959 
  • feedmelinks/users.php

    r1078 r1177  
    5151                $numRows = mysql_num_rows($q); 
    5252 
     53                # DESTROY SNUFFED USERS 
     54                if( mysql_result($q,$i,"disabled") == 1 ) { 
     55                        if( snuffed( $userId )) { 
     56%> 
     57                        <center> 
     58                        <% warn( "<h3>This user has been Snuffed Out&trade;</h3>" ) %> 
     59                                <a href="http://flickr.com/photos/petroleumjelliffe/170473487/"> 
     60                                        <img src="http://static.flickr.com/76/170473487_bb5a3e6a10.jpg" /> 
     61                                </a> 
     62                        <p /> 
     63                        photo by <a href="http://flickr.com/photos/petroleumjelliffe/">petroleumjelliffe</a> 
     64                        </center> 
     65                        <p /> 
     66                        <big> 
     67                                <%= get_snuffed_mesg() %> 
     68                                (You're welcome :-) 
     69                        </big> 
     70 
     71<% 
     72                        return; 
     73                } 
     74                } 
     75 
     76 
    5377                if( $numRows ) { 
    5478                        $i = 0; 
     
    76100        <b><%= encodeAddress( $email, $userId ) %></b></big> 
    77101        <%= get_verbose_contact_link( $userId ) %> 
     102 
     103        <% if( $u && $u != $userId ) { %> 
     104        <p> 
     105                <form name="flag_user_form" action="/diespammersdie/report" method="POST"> 
     106                        <input type="hidden" name="user" value="<%= $userId %>" /> 
     107                        <input type="submit" value="Report this user as a spammer?" /> 
     108                </form> 
     109                </p> 
     110        <% } %> 
     111 
     112        <% if( isJJE( $u ) && $u != $userId ) { %> 
     113        <p> 
     114                <form name="snuff_user_form" action="/admin/snuff" method="POST" style="background-color: red; padding: 1em;"> 
     115                        <input type="hidden" name="user" value="<%= $userId %>" /> 
     116                        <input type="submit" style="background-color: red;" value="End this user's pathetic life?" /> 
     117                </form> 
     118                </p> 
     119        <% } %> 
     120 
    78121        <p> 
    79122                Master of <%= $numLinks %> links and <%= $numFolders %>  
     
    94137        <img src="<%= get_profile_image( $userId ) %>" width="200" /> 
    95138 
     139        <!-- 
    96140        <br /> 
    97141        <big><b><a href="/comments?who=<%= $userId %>">comments by and about <%= $userId == $u ? "you" : $userId %></a></b></big> 
     142        --> 
    98143</div> 
    99144