[MediaWiki-l] What's the secret to using ip_in_range() with AbuseFilter

Al alj62888 at yahoo.com
Thu Oct 24 06:49:55 UTC 2013


Right, but this only works for anonymous users.  user_name holds the IP for anonymous users.  I went ahead and hacked a fix to add a user_ip variable; pretty simple.





On Wednesday, October 23, 2013 10:13 AM, Chris Steipp <csteipp at wikimedia.org> wrote:
 
It accepts a pretty wide range of formats (see IP::parseRange()). So,
>
>
>ip_in_range(user_name, '127.0.0.1/16')
>ip_in_range(user_name, '127.0.0.1')
>ip_in_range(user_name, '127.0.0.0-127.0.255.255')
>
>
>Will all trigger for a localhost editor.
>
>
>
>
>
>On Wed, Oct 23, 2013 at 3:32 AM, Al <alj62888 at yahoo.com> wrote:
>
>I'm glad that I was able to spur some more talk about spam... again /o) 
>>
>>Now, can anyone even venture a guess to my question or shall I start hacking away?  I'm beginning to wonder if I'm not the only one with a moderately hacked wiki. 
>>
>>
>>
>>
>>
>>
>>On Monday, October 21, 2013 10:41 AM, Al <alj62888 at yahoo.com> wrote:
>>
>>There is no documentation on this on the entire world wide web.  There seems to be a variable missing for the user's IP address that can be passed-in to the function.  I tried user_name, but that didn't work and I'm not sure about the range parameter either... I tried "66.187.0.0/16" but that didn't seem to work.
>>>
>>>Much appreciated.
>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>MediaWiki-l mailing list
>>MediaWiki-l at lists.wikimedia.org
>>https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
>
>


More information about the MediaWiki-l mailing list