Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17240: LJSUP-6689: Comment IPs are logged witho...

Committer: gariev
LJSUP-6689: Comment IPs are logged without warning or account settings allowing it

U   branches/r69/cgi-bin/LJ/Talk/Post.pm
Modified: branches/r69/cgi-bin/LJ/Talk/Post.pm
===================================================================
--- branches/r69/cgi-bin/LJ/Talk/Post.pm	2010-08-31 11:27:49 UTC (rev 17239)
+++ branches/r69/cgi-bin/LJ/Talk/Post.pm	2010-08-31 17:42:20 UTC (rev 17240)
@@ -136,8 +136,9 @@
     $talkprop{'picture_keyword'} = $comment->{picture_keyword};
 
     $talkprop{'opt_preformatted'} = $comment->{preformat} ? 1 : 0;
-    if ($journalu->{'opt_logcommentips'} eq "A" ||
-        ($journalu->{'opt_logcommentips'} eq "S" && $comment->{usertype} ne "user"))
+    my $opt_logcommentips = $journalu->{'opt_logcommentips'};
+    if ($opt_logcommentips eq "A" ||
+        ($opt_logcommentips eq "S" && $comment->{usertype} !~ /^(?:user|cookieuser)$/))
     {
         if (LJ::is_web_context()) {
             my $ip = BML::get_remote_ip();
@@ -738,7 +739,9 @@
 
     # set poster IP separately since it has special conditions
     my $opt_logcommentips = $comment_obj->journal->prop('opt_logcommentips');
-    if ($opt_logcommentips eq "A" || ($opt_logcommentips eq "S" && $comment->{usertype} ne "user")) {
+    if ($opt_logcommentips eq "A" || 
+        ($opt_logcommentips eq "S" && $comment->{usertype} !~ /^(?:user|cookieuser)$/)) 
+    {
         $comment_obj->set_poster_ip;
     }
     

Tags: gariev, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments