PEAK XOOPS - Protector Block Not Necessary? in englishin japanese

Protector Block Not Necessary?

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/23 4:47
tripmon  一等兵   Posts: 14
Hi GI Joe,

Has the protector Block been removed from the new versions? I see in 2.55 that there are no block files in the distribution and after after deleting the old block and updating protector (and module update) no block is created.

xoops 2.2.4
Protector 2.55
IIS

Thanks,
Tripmon
Votes:9 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/23 5:34
GIJOE  先任軍曹   Posts: 4110
hi Tripmon.

There are no blocks in Protector >= 2.40

Instead, including postcheck is necessary.
Please check mainfile.php or "Security Advisory" in Protecotor
Votes:6 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/23 6:12
tripmon  一等兵   Posts: 14
Thanks GI Joe,

I noticed that the block was still active (not removed during the upgrade) after upgrades while trying to troubleshoot a intermittent blank page issue.

If I find it is a protector issue I will post back.

Thanks again.

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/24 6:04
GIJOE  先任軍曹   Posts: 4110
I've just understand what's wrong.

It's a problem of compatibility between 2.2.x and Protector.

OK. I'll fix it.
Votes:7 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/25 6:43
GIJOE  先任軍曹   Posts: 4110
Try this code.

modules/protector/include/onupdate.inc.php
<?php

if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;

global $xoopsDB , $msgs ;

$check_result = $xoopsDB->query( "DELETE FROM ".$xoopsDB->prefix("protector_access") ) ;
if( ! $check_result ) {

	$ret = $xoopsDB->queryF( "
	
	CREATE TABLE ".$xoopsDB->prefix("protector_access")." (
	  ip varchar(255) NOT NULL default '0.0.0.0',
	  request_uri varchar(255) NOT NULL default '',
	  expire int NOT NULL default 0,
	  KEY (ip),
	  KEY (request_uri),
	  KEY (expire)
	) TYPE=MyISAM
	
	" ) ;

}

if( substr( XOOPS_VERSION , 6 , 3 ) > 2.0 ) {
	$block_instance_title = defined( '_MI_PROTECTOR_BNAME1' ) ? _MI_PROTECTOR_BNAME1 : 'Protector' ;
	$xoopsDB->query( "DELETE FROM ".$xoopsDB->prefix("block_instance")." WHERE title='".addslashes($block_instance_title)."'" ) ;
}

$xoopsDB->query( "DELETE FROM ".$xoopsDB->prefix("newblocks")." WHERE dirname='protector' AND func_file='protector_block.php' AND show_func='b_protector_show'" ) ;

$xoopsDB->query( "ALTER TABLE ".$xoopsDB->prefix("config")." ADD KEY (conf_title)" ) ;

$xoopsDB->query( "ALTER TABLE ".$xoopsDB->prefix("protector_access")." ADD malicious_actions varchar(255) NOT NULL default '' AFTER request_uri, ADD KEY (malicious_actions), ADD KEY (ip), ADD KEY (request_uri), ADD KEY (expire)" ) ;


?>

After iserting 4 lines, update protector in modules admin.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/26 12:21
tripmon  一等兵   Posts: 14
Thanks GI JOE,

I don't think protector had anything to do with it, but before I could get a chance to update the module after adding this code my 2.2.4 site crashed and I decided to revert to 2.0.13.2 again.

Thanks again for the great modules and your expert assistance to the core and users !!!!
Votes:7 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/3/27 6:09
GIJOE  先任軍曹   Posts: 4110
Quote:
I decided to revert to 2.0.13.2 again

Good decision, I think.
Votes:15 Average:5.33

question Re: Protector Block Not Necessary?

msg# 1.1.1.1.1.1.1.1
Previous post - Next post | Parent - No child | Posted on 2006/3/28 4:00
tripmon  一等兵   Posts: 14
I think so too, just got finished putting the database back together again... 2.2.4 crashed before I could start the downgrade, so I had to fix the database manually...UGH.

But it is all happy now!
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!