Parte I. Antes de Instalar o Protector ... Criando XOOPS_TRUST_PATH
Para publicar um site na web é necessário que os arquivos estejam dentro de uma pasta [public_html] [www] ou, ainda, [httpdocs]. Isso gera um problema para a segurança no caso de arquivos vitais do sistema.
O conceito do Xoops_Truth_Path, é criar uma pasta que fique fora da visão web [do acesso por web], ou seja, fora da pasta [httpdocs] ou [public_html][www] e onde os arquivos possam ficar armazenados com menor risco.
O nome Xoops_Truth_Path é apenas uma referência - como você verá nas figuras abaixo.. Imp: Qualquer nome poderá ser usado por você. Os exemplos abaixo são da visualização da estrutura básica de pastas em um painel tipo Plesk [figura 1] ou Cpanel [figura 2].
Figura 1 [Plesk]
Figura 2 [Cpanel]
Repare que nesse caso, a pasta xtrustpath (nome escolhido no exemplo, mas você pode colocar o nome de sua preferência) está fora da pasta www [ou public_html ou httpdocs], que é onde os arquivos de um site ficam.
Essa pasta será utilizada nos próximos passos, “Instalando o Protector” e “Protegendo seu arquivo mainfile.php”. Alguns módulos [em especial os criados por Gijoe - veja seu site clicando aqui- também requerem esta pasta para instalação, portanto sempre que for instalar um módulo, verifique as instruções para saber como proceder.
O que estamos dizendo é que você deve CRIAR [usando seu programa de FTP, ou pelo painel de controle do seu host] uma pasta como demonstrado acima.
Tendo você já feito isso ... está na hora de alterar o mainfile.php do seu XOOPS. Lembrou de fazer um backup deste fundamental arquivo? Não? Então faça ANTES do próximo passo.
Para alterar o mainfile.php de forma a usar o recurso XOOPS_TRUST_PATH você deve incluir a linha:
define('XOOPS_TRUST_PATH', '/caminho/xoopstrustpath*');
antes da linha:
// XOOPS Virtual Path(URL)
(* onde xoopstrustpath deve ser trocado pelo nome de sua pasta e '/caminho/' pelo caminho [path] de seu servidor. [Você percebeu que trocamos o nome xtrustpath para xoopstrustpath, não é? É claro que você deve usar o nome que criou para sua pasta com seu XOOPS_TRUS_PATH.]
Uma última lembranaça: ...Não esqueça do ponto e vírgula no fim e cuide para manter as aspas!)
Vejamos isto com imagens ...
Agora o mainfile já com o caminho para XOOPS_TRUST_PATH definido...
Nota: Lembre também de ler os arquivos de explicações que acompanham cada módulo. [pagebreak] Parte II . Instalando o Protector
Neste momento você já alterou o seu mainfile para operar com XOOPS_TRUST_PATH. Vamos ao segundo passo: instalar o Protector. Antes de mais nada verifique se você tem a última versão do Protector,
1. Visualização inicial:
2. Vamos olhar o conteúdo da pasta html [figura 1] e da pasta xoops_trust_path [figura 2] :
Pasta html:
Pasta XOOPS_TRUST_PATH:
Faça upload via FTP (COPIE), da seguitne forma:
Copie o conteúdo da pasta html/modules/protector (com sua estrutura de pastas e arquivos) para dentro de XOOPS_ROOT_PATH/modules/
Copie o conteúdo de xoops_trust_path/modules/protector (com sua estrutura de pastas e arquivos) para dentro de XOOPS_TRUST_PATH/modules/
Torne a pasta(e arquivos) em XOOPS_TRUST_PATH/modules/protector/configs com permissão de escrita [CHMOD 777]
Finalmente: Instale o módulo.
Agora temos que alterar o mainfile para o pré-check e post-check funcionarem. Voltemos ao mainfile então. Procure onde está a linha
if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '' ) { include XOOPS_ROOT_PATH."/include/common.php"; }
Você irá incluir uma linha antes e depois dela. Veja a figura abaixo:
Se tudo correu bem, você irá ver que a configuração do mainfile está correta na 'Central de Segurança' do módulo. À esta altura você já deve estar se perguntando ... 'não seria interessante proteger o mainfile todo?'
Parte III: Protegendo o mainfile.php
Relembrando...
O mainfile.php é o arquivo que guarda toda a informação essencial do seu site, incluídas aí a senha e nome do usuário do seu banco de dados. E o nome do banco de dados, e o path [caminho físico] do seu site! Se você percebeu, ao editá-lo para instalar o protector, uma boa parte do que existe de fundamental a ser protegido está ali.E todos que já operaram com XOOPS SABEM que o mainfile está na raiz do seu site. Ou deveria estar. Mais uma razão para nos perguntarmos ... que tal tirar o mainfile da possibilidade de ser acessado pela WEB?
Movendo o mainfile
Na verdade é muito simples... Faça uma cópia do seu arquivo mainfile.php usado no site, e coloque essa cópia para a pasta 'xtrustpath'[veja Parte II].
Depois, substitua todo o conteúdo do mainfile.php original por :
require_once('/caminho/xtrustpath/mainfile.php') ?>
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1); // XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/home/daeqhos/public_html');
define('XOOPS_ROOT_PATH', '/home/seulogincpanel/public_html');
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://meusite.com.br');
define('XOOPS_URL', 'http://meusite.com.br');
define('XOOPS_CHECK_PATH', 1);
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
if ( function_exists('debug_backtrace') ) {
$xoopsScriptPath = debug_backtrace();
if ( !count($xoopsScriptPath) ) {
die("XOOPS path check: this file cannot be requested directly");
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];
} else {
$xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
}
if ( DIRECTORY_SEPARATOR != '/' ) {
// IIS6 may double the \ chars
$xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
}
if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
}
} // Database
// Choose the database to be used
define('XOOPS_DB_TYPE', 'mysql'); // Table Prefix
// This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
define('XOOPS_DB_PREFIX', 'xoops'); // Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'localhost'); // Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'seulogincpanel_nomedousuariobd'); // Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'senhausuariobd'); // Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'nomebd'); // Use persistent connection? (Yes=1 No=0)
// Default is 'Yes'. Choose 'Yes' if you are unsure.
define('XOOPS_DB_PCONNECT', 0); define('XOOPS_GROUP_ADMIN', '1');
define('XOOPS_GROUP_USERS', '2');
define('XOOPS_GROUP_ANONYMOUS', '3'); foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
if ( isset( $_REQUEST[$bad_global] ) ) {
header( 'Location: '.XOOPS_URL.'/' );
exit();
}
}
if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {
include XOOPS_ROOT_PATH."/include/common.php";
} }
?>
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1); // XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/home/daeqhos/public_html');
define('XOOPS_ROOT_PATH', '/home/seulogincpanel/public_html');
// definindo o XOOPS_TRUST_PATH - basico para o protector
define('XOOPS_TRUST_PATH','/home/seulogincpanel/aleulia');
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://meusite.com.br');
define('XOOPS_URL', 'http://meusite.com.br'); define('XOOPS_CHECK_PATH', 1);
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
if ( function_exists('debug_backtrace') ) {
$xoopsScriptPath = debug_backtrace();
if ( !count($xoopsScriptPath) ) {
die("XOOPS path check: this file cannot be requested directly");
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];
} else {
$xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
}
if ( DIRECTORY_SEPARATOR != '/' ) {
// IIS6 may double the \ chars
$xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
}
if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
}
} // Database
// Choose the database to be used
define('XOOPS_DB_TYPE', 'mysql'); // Table Prefix
// This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
define('XOOPS_DB_PREFIX', 'xoops'); // Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'localhost'); // Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'seulogincpanel_nomedousuariobd'); // Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'senhausuariobd'); // Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'nomebd'); // Use persistent connection? (Yes=1 No=0)
// Default is 'Yes'. Choose 'Yes' if you are unsure.
define('XOOPS_DB_PCONNECT', 0); define('XOOPS_GROUP_ADMIN', '1');
define('XOOPS_GROUP_USERS', '2');
define('XOOPS_GROUP_ANONYMOUS', '3'); foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
if ( isset( $_REQUEST[$bad_global] ) ) {
header( 'Location: '.XOOPS_URL.'/' );
exit();
}
}
include XOOPS_TRUST_PATH.'/modules/protector/include/precheck.inc.php' ;
if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '' ) {
include XOOPS_ROOT_PATH."/include/common.php";
}
include XOOPS_TRUST_PATH.'/modules/protector/include/postcheck.inc.php' ;
}}
?>
require_once('/home/seulogincpanel/aleluia/mainfile.php')
Marcadores: CMS, Cube, Download, FTP, MySQL, PHP, Protector, Release, Security, Windows, XOOPS
We would like to first thank you all for the tests, reviews, and reports so far. The XOOPS Cube project team is proud to announce the release of the XOOPS Cube Legacy 2.1 beta3 series.
This is the beta version so that it may have some bugs. Please use this version for evaluation purpose. We appreciate your feedbacks and bug reports of the beta.
The beta3 will be the last beta release for the XOOPS Cube Legacy 2.1. The dev team is planning to release the RC version next week (on 13th of November). We may release archive (next number ... beta 3e or 3f) anytime if necessary, like nightly-build archive. So, please refer to download page for new archive.
For features of the XOOPS Cube Legacy 2.1 beta version, please refer to this article.
As for changelog of this release, please refer to this post.
Download
Please refer to the download page on this site.
Upgrade
From Beta1 / Beta2 / Beta3
1) Overwrite all the files of previous release with all files included in the latest release.
2) Modify mainfile.php.
3) Go to the module administration section, update the Legacy, the user and the legacyRender modules.
Other cases (Alpha4-e or prior)
Please refer to this article to upgrade. And then, modify mainfile.php.
This is beta release which may include some serious bugs. Please use it at your own risk.
We appreciate your experiments use and feedbacks. At this time, your comments and report really help us for future development.
Best regards,
The XOOPS Cube Project Team
Marcadores: Cube, Release, XOOPS
We would like to first thank you all for the tests, reviews, and reports so far. The XOOPS Cube project team is proud to announce the release of the XOOPS Cube Legacy 2.1 beta3.
This is the beta version so that it may have some bugs. Please use this version for evaluation purpose. We appreciate your feedbacks and bug reports of the beta.
For features of the XOOPS Cube Legacy 2.1 beta version, please refer to this article.
For test users
In this release, there are big changes on module installer, uninstaller and updater. So, please install and uninstall many modules for evaluation.
Many of changelogs in this release are related to adjustment of specs. We are continue to working on bug fixes which is reported by you guys.
When we update modules, blocks (including block access rights) would be initialized. We will fix this bug in next release (in next week).
The followings are the changelog from the Beta2.
Chagelog
- Fix a bug about page_title of Legacy_RenderSystem.
- Fix the bug that theme templates can't get $xoops_xxxxx correctly.
- Fix the bug "VIEWEMAIL checkbox" of useredit didn't display under the specific condition.
- Implement postFilter().
- Exchange Legacy_ModuleUpdater with Legacy_PhasedUpgrader.
- Fetch functions about user control event to Legacy_Utils.
- Move stylesheets about Legacy, from global css to module css.
- Adjust stylesheets of help.
- Adjust XOOPS Cube Legacy 2.1 KICK START GUIDE (Special thx daddystu!)
- Adjust SQL scanner for Cube Style.
- Fix Bug & Typo in Shade_SoapClient lib.
- Fix TYPO in Legacy_Utils::createBlockProcedure()
- Add the custom-installer spec.
- Add Legacy_ModuleInstallUtils for the custom-installer.
- Change Legacy_ModuleInstaller & Legacy_ModuleInstall action for the custom-installer
- Change Legacy_ModuleUninstaller & Legacy_ModuleUninstallAction for the custom-uninstaller
- Remove wizard type module installer on a temporary basis.
Please also refer to this post for information of this release.
Download
Please refer to the download page on this site.
Upgrade
From Beta1 / Beta2
1) Overwrite all the files of previous release with all files included in the beta2 release.
2) Go to the module administration section, update the Legacy, the user and the legacyRender modules.
Other cases (Alpha4-e or prior)
Please refer to this article to upgrade.
This is beta release which may include some serious bugs. Please use it at your own risk.
We appreciate your experiments use and feedbacks. At this time, your comments and report really help us for future development.
Best regards,
The XOOPS Cube Project Team
Marcadores: Cube, Release, XOOPS
Setembro 1996 Outubro 1996 Abril 1998 Maio 1998 Janeiro 1999 Fevereiro 2000 Outubro 2000 Dezembro 2000 Janeiro 2001 Agosto 2001 Setembro 2001 Dezembro 2001 Janeiro 2002 Fevereiro 2002 Fevereiro 2003 Março 2003 Junho 2003 Julho 2003 Agosto 2003 Setembro 2003 Outubro 2003 Novembro 2003 Dezembro 2003 Janeiro 2004 Fevereiro 2004 Março 2004 Abril 2004 Junho 2004 Agosto 2004 Setembro 2004 Outubro 2004 Novembro 2004 Dezembro 2004 Janeiro 2005 Fevereiro 2005 Abril 2005 Maio 2005 Junho 2005 Julho 2005 Agosto 2005 Setembro 2005 Outubro 2005 Novembro 2005 Dezembro 2005 Janeiro 2006 Fevereiro 2006 Março 2006 Abril 2006 Maio 2006 Junho 2006 Julho 2006 Agosto 2006 Setembro 2006 Outubro 2006 Novembro 2006 Dezembro 2006 Janeiro 2007 Fevereiro 2007 Março 2007 Abril 2007 Maio 2007 Junho 2007 Julho 2007 Agosto 2007 Setembro 2007 Outubro 2007 Novembro 2007 Dezembro 2007 Janeiro 2008 Fevereiro 2008 Março 2008 Abril 2008 Maio 2008 Junho 2008 Julho 2008 Agosto 2008 Setembro 2008 Outubro 2008 Novembro 2008 Dezembro 2008 Janeiro 2009 Fevereiro 2009 Março 2009 Abril 2009 Maio 2009 Junho 2009 Julho 2009 Agosto 2009 Setembro 2009 Outubro 2009 Novembro 2009 Dezembro 2009 Fevereiro 2010
Assinar Postagens [Atom]