[pLog-svn] bad behavior diff

Paul Westbrook paul at westbrooks.org
Sun Sep 3 23:58:17 GMT 2006


Hello,
    I think that this problem is cause because the javascript is  
generated by php.  So the first time that a page is looked at, the  
generated javascript will have the ip address of the requestor.  If  
that page is cached, the ip address for the first requestor will  
remain in the javascript of the cached page.

    I have seen cases where when I look at the source for my page,  
which has the javascript inserted into my template, the ip address  
embedded is for a different ip address.  For example, I am accessing  
my blog from ip address 24.23.206.54, but when I just accessed my  
blog, and looked at the source, I see:

			myElement.value = '1157327472 217.235.113.132';

Since the javascript is not generated for every request, the  
calculation for the amount of time from a  page load to a comment  
submission, will not work.

--Paul


On Sep 3, 2006, at 10:22 AM, Mark Wu wrote:

> Hi Jon:
>
> Do you insert javascript as I suggest in readme.txt ?
>
> Because I never has this problem in my installation.
>
> Nark
>
>> -----Original Message-----
>> From: plog-svn-bounces at devel.lifetype.net
>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
>> Sent: Wednesday, August 30, 2006 12:44 AM
>> To: LifeType SVN
>> Subject: [pLog-svn] bad behavior diff
>>
>> Mark - I thought you might want to see this diff, and since
>> the plugin/svn email hook isn't working, I will manually do it:
>>
>> plog/plugins/badbehavior/bad-behavior>svn diff -r3900 post.inc.php
>> Index: post.inc.php
>> ===================================================================
>> --- post.inc.php        (revision 3900)
>> +++ post.inc.php        (working copy)
>> @@ -37,8 +37,10 @@
>>                  // if ($screener + 5 > time())
>>                  //      return "408d7e72";
>>                  // Posting too slow? 48 hr
>> -               if ($screener + 172800 < time())
>> -                       return "b40c8ddc";
>> +        // LifeType mod by jondaley: since pages can be cached, the
>> +        // cookie might not be updated
>> +        // and this can get tripped incorrectly
>> +//             if ($screener + 172800 < time())
>> +//                     return "b40c8ddc";
>>
>>
>>
>> I am not entirely sure how it happened - ie. why my
>> mother-in-law didn't get a new copy of the page when she came
>> back apparently more than 48 hours her prior viewing, and
>> then hit the "search" button.
>>
>> Maybe the cookie isn't getting set when the page is cached?
>> It is javascript, so that part shouldn't ever be cached, right?
>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

--
Paul Westbrook
paul at westbrooks.org
<http://www.westbrooks.org>




More information about the pLog-svn mailing list