Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-29T13:07:43-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6145 2011-04-29T13:07:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13783#p13783 <![CDATA[Re: Reducing Security Breach timeout]]>

Statistics: Posted by Cristián Lávaque — April 29th, 2011, 1:07 pm


]]>
2011-04-29T12:20:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13774#p13774 <![CDATA[Re: Reducing Security Breach timeout]]> ( I can take a hint )

Statistics: Posted by Jason Caldwell — April 29th, 2011, 12:20 pm


]]>
2011-04-27T14:43:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13585#p13585 <![CDATA[Re: Reducing Security Breach timeout]]>

Statistics: Posted by Cristián Lávaque — April 27th, 2011, 2:43 pm


]]>
2011-04-27T02:12:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13521#p13521 <![CDATA[Re: Reducing Security Breach timeout]]> Yes, that code is correct.

And Cristián is correct too, there is no official Filter for max_ip_restriction_time, because this is a configurable option in s2Members' General Options panel.

In your case though, you are not happy with the available options; so, this code is overriding the option value dynamically. Thus, it won't show up in your options panel, because it's not an available option ( yet ).

I'm adding the 5 minute option to the next release, so this code will not be necessary in s2Member v3.6+.

Code:
<?php
add_action 
("ws_plugin__s2member_after_loaded", "my_function");
function my_function ()
{
    $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction_time"] = 300;
    /* This is in seconds. 300 seconds = 5 minutes. */
?>

Statistics: Posted by Jason Caldwell — April 27th, 2011, 2:12 am


]]>
2011-04-26T13:38:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13461#p13461 <![CDATA[Re: Reducing Security Breach timeout]]> Statistics: Posted by sensei — April 26th, 2011, 1:38 pm


]]>
2011-04-26T13:31:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13459#p13459 <![CDATA[Re: Reducing Security Breach timeout]]> Statistics: Posted by Cristián Lávaque — April 26th, 2011, 1:31 pm


]]>
2011-04-26T13:10:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13449#p13449 <![CDATA[Re: Reducing Security Breach timeout]]>
Thanks for your help!

Marc

Statistics: Posted by sensei — April 26th, 2011, 1:10 pm


]]>
2011-04-26T13:03:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13448#p13448 <![CDATA[Re: Reducing Security Breach timeout]]>

Yes. Without knowing if the code works or not, that's how I'd put them together in the file.

Statistics: Posted by Cristián Lávaque — April 26th, 2011, 1:03 pm


]]>
2011-04-26T12:49:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13444#p13444 <![CDATA[Re: Reducing Security Breach timeout]]>
Does this look correct?

Thanks!

Marc

Code:
<?php
add_filter 
("ws_plugin__s2member_ip_restrictions__concurrency_time_per_ip", "s2_concurrency_time_per_ip");
function s2_concurrency_time_per_ip ()
{
    return "72 hours";
}

add_action ("ws_plugin__s2member_after_loaded", "my_function");
function my_function ()
{
    $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction_time"] = 300;
    /* This is in seconds. 300 seconds = 5 minutes. */
}
?>

Statistics: Posted by sensei — April 26th, 2011, 12:49 pm


]]>
2011-04-26T11:54:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13428#p13428 <![CDATA[Re: Reducing Security Breach timeout]]> Statistics: Posted by Cristián Lávaque — April 26th, 2011, 11:54 am


]]>
2011-04-26T11:38:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13425#p13425 <![CDATA[Re: Reducing Security Breach timeout]]>
I already have a s2-hacks.php file to hack the unique ip address time with the following code:

Code:
<?php
add_filter 
("ws_plugin__s2member_ip_restrictions__concurrency_time_per_ip""s2_concurrency_time_per_ip");
function 
s2_concurrency_time_per_ip ()
{
    return 
"72 hours";
}
?>


Can I add the "security breach" snippet to the same php file or do I need to create another php file inside the mu-plugins. I tried it in the same file but didn't seem to have an affect on the security breach timeout.

Thanks!

Marc

Statistics: Posted by sensei — April 26th, 2011, 11:38 am


]]>
2011-04-21T01:12:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13071#p13071 <![CDATA[Re: Reducing Security Breach timeout]]> Hi Marc.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_action 
("ws_plugin__s2member_after_loaded", "my_function");
function my_function ()
    {
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction_time"] = 300;
        /* This is in seconds. 300 seconds = 5 minutes. */
    }
?>

Statistics: Posted by Jason Caldwell — April 21st, 2011, 1:12 am


]]>
2011-04-20T14:12:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6145&p=13021#p13021 <![CDATA[Reducing Security Breach timeout]]>
I successfully hacked the amount of time for the unique ip's and wondered if I can reduce the the amount of time it punishes the the offenders of link sharing. I'm looking at a 5 min punishment. Since we have a webcast going, 15 mins is like standing on the wall during a 20 min recess.

Thanks!
Marc

Statistics: Posted by sensei — April 20th, 2011, 2:12 pm


]]>