PEAK XOOPS - Bad IP delimiters in englishin japanese

Bad IP delimiters

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum

question Re: Bad IP delimiters

msg# 1.1.1.1.2.1.1
Previous post - Next post | Parent - No child | Posted on 2005/11/29 14:23
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi tedsmith.

Thank you for suggestion.
I've just applied it.
Votes:0 Average:0.00

question Re: Bad IP delimiters

msg# 1.1.1.1.2.1
Previous post - Next post | Parent - Children.1 | Posted on 2005/10/18 4:52
tedsmith  ¸àĹ   Posts: 64
Thanks GIJOE - I came here looking for the answer to that question too. It would definately be a good idea to just have a single line of text saying something like "Seperate each IP address with a '|' deliminator". I am using Version 2.4 - maybe you have already applied it to 2.52?

Thanks

Ted
Votes:0 Average:0.00

question Re: Bad IP delimiters

msg# 1.1.1.1.2
Previous post - Next post | Parent - Children.1 | Posted on 2005/5/11 19:10
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi karedokx.

I'm sorry that I misunderstood your question.
As Dave wrote, the delimiter is | .

It is same as the preferences of the xoops core.
Votes:0 Average:0.00

normal Re: Bad IP delimiters

msg# 1.1.1.1.1
Previous post - Next post | Parent - No child | Posted on 2005/5/11 5:06
Dave_L  ¾åÅùʼ From: Virginia, USA  Posts: 35
The delimiter must be "|".

Here's the code that parses that field, from modules/protector/admin/index.php:

$criteria = new CriteriaCompo(new Criteria('conf_modid', 0));
$criteria->add(new Criteria('conf_name', 'bad_ips'));
list( $config ) = $config_handler->getConfigs( $criteria );
$config->setVar( 'conf_value' , serialize( explode( '|' , trim( $_POST['bad_ips'] ) ) ) ) ;
$config_handler->insertConfig( $config ) ;
Votes:0 Average:0.00

question Re: Bad IP delimiters

msg# 1.1.1.1
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/5/9 1:28
karedokx  ¸àĹ   Posts: 65
i'm really sorry gijoe, if i didn't make myself clear. language limitiation

my question is actually the similar question raise by macelee. should it be something like xxx|xxx| and so on? can i just us xxx (space) xxx or xxx,xxx, and so on.

what i mean with more descriptive is to put a description/note on the admin screen, what should we use as the delimiter.

sorry once again for not making myself clear.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/5/8 17:02
macelee  ÆóÅùʼ   Posts: 3
I am still not clear what delimiter to use to separate bad IPs.

Should it be something like xxx.xxx.xxx.xxx|xxx.xxx.xxx.xxx?

An example with multiple IPs in the admin will definitely help beginners like me. Thanks
Votes:13 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/5/6 15:20
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi karedokx

Quote:
what kind of delimiters can we use for the banned ip list? only "|"?

gijoe, it will be more descriptive for new users too i think if we can put these delimiters in the protector admin screen.
Which interfaces do you think good ?

Without delimiter, many textbox can be used.

Or you mean the other delimiter like ',' ?

Anyway, the banned IP is a pattern for preg_match().
Thus, it is important to select the delimiter properly.

You can find the code like this in include/common.php or class/xoopssecurity.php.
            foreach ($xoopsConfig['bad_ips'] as $bi) {
                if (!empty($bi) && preg_match("/".$bi."/", $_SERVER['REMOTE_ADDR'])) {
                    exit();
                }
            }
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2005/5/4 16:17
karedokx  ¸àĹ   Posts: 65
what kind of delimiters can we use for the banned ip list? only "|"?

gijoe, it will be more descriptive for new users too i think if we can put these delimiters in the protector admin screen.

thanks.
Votes:11 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!