Lançamento Joomla! 1.0.4

Moderator: ariadneduvessa

Locked
User avatar
FaBMak
Joomla! Guru
Joomla! Guru
Posts: 611
Joined: Fri Aug 19, 2005 1:59 am
Location: Brasil
Contact:

Lançamento Joomla! 1.0.4

Post by FaBMak » Mon Nov 21, 2005 8:22 pm

Foi liberado hoje o Joomla! 1.0.4. Esta versão apresenta um série de correções de segurança para ataques XSS e SQL Injections, sendo considerados de gravidade média e alta, a atualização deve ser realizada imediatamente em todos os sites Joomla!

Detalhes:
Anúncio Oficial
Changelog 1.0.4

Download:
Patch Joomla! 1.0.4
Pacote Completo Joomla! 1.0.4

FaBMak
Last edited by FaBMak on Mon Dec 26, 2005 9:05 pm, edited 1 time in total.
Fabricio Elias Costa - Moderador do Joomla.org e Coordenador da Tradução Brasileira do Joomla!
Katipsoi Zunontee - http://ka-tips-oi-zu-non-tee.com/

User avatar
pchardnet
Joomla! Ace
Joomla! Ace
Posts: 1888
Joined: Thu Aug 18, 2005 5:34 pm
Location: BH/MG - Brasil
Contact:

Re: Atualização Joomla! 1.0.4

Post by pchardnet » Mon Nov 21, 2005 9:29 pm

Ufa, mais serviço...

User avatar
bigodines
Joomla! Hero
Joomla! Hero
Posts: 2227
Joined: Thu Aug 18, 2005 11:10 am
Location: Floripa, Brazil
Contact:

Re: Atualização Joomla! 1.0.4

Post by bigodines » Tue Nov 22, 2005 9:02 am

Pessoal atualizem as versoes... o buraco na seguranca eh serio mesmo. (tanto que o site do mamboserevr foi [removed] dois dias atras)

Giovani

Re: Atualização Joomla! 1.0.4

Post by Giovani » Tue Nov 22, 2005 12:20 pm

pergunta noob!

tem algum item no administrador do joomla que faça ou baixe e instale o upgrade automaticamente?
Do contrário, eu tenho que baixar a nova versão e atualizar os arquivos certo?

abraços!

Giovani

Re: Atualização Joomla! 1.0.4

Post by Giovani » Tue Nov 22, 2005 12:32 pm

continuo com minha dúvida, porém já atualizei a versão baixando o 1.0.4 e descompactando dentro do diretório raiz..

o que achei estranho é que na imagem do topo.. do joomla, continua a versão 1.3 porém no rodapé ele mostra 1.0.4..

será que eles esqueceram de atualizar a imagem? como que está aparecendo para vc's??

t+

User avatar
bigodines
Joomla! Hero
Joomla! Hero
Posts: 2227
Joined: Thu Aug 18, 2005 11:10 am
Location: Floripa, Brazil
Contact:

Re: Atualização Joomla! 1.0.4

Post by bigodines » Tue Nov 22, 2005 2:24 pm

Galera, ha um erro no arquivo:
administrator/components/com_media/admin.media.php

da versao 1.0.4 .

Por favor substituam por esse conteudo:

Code: Select all

<?php
/**
* @version $Id$
* @package Joomla
* @subpackage Massmail
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

// ensure user has access to this function
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
		| $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_media' ))) {
	mosRedirect( 'index2.php', _NOT_AUTH );
}

require_once( $mainframe->getPath( 'admin_html' ) );
//require_once( $mainframe->getPath( 'class' ) );

/**
 * Makes file name safe to use
 * Temporary function for 1.0.x only
 * @param string The name of the file (not full path)
 * @return string The sanitised string
 */
function makeSafe( $file ) {
	$regex = '#\.\.[^A-Za-z0-9\.\_\-/ ]#';
	return preg_replace( $regex, '', $file );
}

$cid = mosGetParam( $_POST, 'cid', array(0) );
if (!is_array( $cid )) {
	$cid = array(0);
}

$listdir = makeSafe( mosGetParam( $_REQUEST, 'listdir', '' ) );
$dirPath = makeSafe( mosGetParam( $_POST, 'dirPath', '' ) );

if (is_int(strpos ($listdir, "..")) && $listdir != '') {
	mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "NO HACKING PLEASE" );
}

define( 'COM_MEDIA_BASE', $mosConfig_absolute_path . DIRECTORY_SEPARATOR . 'images' );
define( 'COM_MEDIA_BASEURL', $mosConfig_live_site . '/images' );

switch ($task) {

	case 'upload':
		upload();
		showMedia( $dirPath );
		break;

	case 'newdir':
		if (ini_get('safe_mode')=='On') {
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Directory creation not allowed while running in SAFE MODE as this can cause problems." );
		} else {
			create_folder( $dirPath );
		}
		showMedia( $dirPath );
		break;

	case 'delete':
		delete_file( $listdir );
		showMedia( $listdir );
		break;

	case 'deletefolder':
		delete_folder( $listdir );
		showMedia( $listdir );
		break;

	case 'list':
		listImages( $listdir );
		break;

	case 'cancel':
		mosRedirect( 'index2.php' );
		break;
	
	default:
		showMedia( $listdir );
		break;
}

/**
 * Deletes a file
 * @param string The relative folder path to the file
 */
function delete_file( $listdir ) {
	$delFile = makeSafe( mosGetParam( $_REQUEST, 'delFile', '' ) );
	$fullPath = COM_MEDIA_BASE . $listdir . DIRECTORY_SEPARATOR . $delFile;

	if (file_exists( $fullPath )) {
		unlink( $fullPath );
	} else {
	}
}

function create_folder($dirPath) {
	$folder_name = mosGetParam( $_POST, 'foldername', '' );

	if(strlen($folder_name) >0) {
		if (eregi("[^0-9a-zA-Z_]", $folder_name)) {
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Directory name must only contain alphanumeric characters and no spaces please." );
		}
		$folder = COM_MEDIA_BASE . $dirPath . DIRECTORY_SEPARATOR . $folder_name;
		if(!is_dir( $folder ) && !is_file( $folder )) {
			mosMakePath( $folder );
			$fp = fopen( $folder . "/index.html", "w" );
			fwrite( $fp, "<html>\n<body bgcolor=\"#FFFFFF\">\n</body>\n</html>" );
			fclose( $fp );
			mosChmod( $folder."/index.html" );
			$refresh_dirs = true;
		}
	}
}

function delete_folder($listdir) {
	$delFolder = mosGetParam( $_REQUEST, 'delFolder', '' );

	$del_html 	= COM_MEDIA_BASE . $listdir . $delFolder . DIRECTORY_SEPARATOR . 'index.html';
	$del_folder = COM_MEDIA_BASE . $listdir . $delFolder;

	$entry_count = 0;
	$dir = opendir( $del_folder );
	while ($entry = readdir( $dir )) {
		if( $entry != "." & $entry != ".." & strtolower($entry) != "index.html" )
		$entry_count++;
	}
	closedir( $dir );

	if ($entry_count < 1) {
		@unlink( $del_html );
		rmdir( $del_folder );
	} else {
		echo '<font color="red">Unable to delete: not empty!</font>';
	}
}

function upload() {
	if (isset($_FILES['upload']) && is_array($_FILES['upload']) && isset($_POST['dirPath'])) {
		$dirPathPost = $_POST['dirPath'];

		if(strlen($dirPathPost) > 0) {
			if(substr($dirPathPost,0,1)=='/')
				$IMG_ROOT .= $dirPathPost;
			else
				$IMG_ROOT = $dirPathPost;
		}

		if (strrpos( $IMG_ROOT, '/' )!= strlen( $IMG_ROOT )-1) {
			$IMG_ROOT .= '/';
		}

		do_upload( $_FILES['upload'], COM_MEDIA_BASE . $dirPathPost . '/' );
	}
}

function do_upload($file, $dest_dir) {
	global $clearUploads;

		if (file_exists($dest_dir.$file['name'])) {
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Upload FAILED.File allready exists" );
		}

		$format = substr( $file['name'], -3 );

		$allowable = array (
			'xcf',
			'odg',
			'gif',
			'jpg',
			'epg',
			'png',
			'bmp',
			'doc',
			'txt',
			'xls',
			'csv',
			'ppt',
			'swf',
			'pdf',
			'odt',
			'ods',
			'odp'
		);

        $noMatch = 0;
		foreach( $allowable as $ext ) {
			if ( strcasecmp( $format, $ext ) == 0 ) $noMatch = 1;
		}
        if(!$noMatch){
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], 'This file type is not supported' );
        }

		if (!move_uploaded_file($file['tmp_name'], $dest_dir.strtolower($file['name']))){
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Upload FAILED" );
			}
		else {
			mosChmod($dest_dir.strtolower($file['name']));
			mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], "Upload complete" );
		}

	$clearUploads = true;
}

function recursive_listdir( $base ) {
	static $filelist = array();
	static $dirlist = array();

	if(is_dir($base)) {
		$dh = opendir($base);
		while (false !== ($dir = readdir($dh))) {
			if (is_dir($base ."/". $dir) && $dir !== '.' && $dir !== '..' && strtolower($dir) !== 'cvs' && strtolower($dir) !== '.svn') {
				$subbase = $base ."/". $dir;
				$dirlist[] = $subbase;
				$subdirlist = recursive_listdir($subbase);
			}
		}
		closedir($dh);
	}
	return $dirlist;
 }


/**
* Show media manager
* @param string The image directory to display
*/
function showMedia($listdir) {
	global $mosConfig_live_site;

	// get list of directories
	$imgFiles 	= recursive_listdir( COM_MEDIA_BASE );
	$images 	= array();
	$folders 	= array();
	$folders[] 	= mosHTML::makeOption( "/" );

	$len = strlen( COM_MEDIA_BASE );
	foreach ($imgFiles as $file) {
		$folders[] = mosHTML::makeOption( substr( $file, $len ) );
	}
	if (is_array( $folders )) {
		sort( $folders );
	}
	// create folder selectlist
	$dirPath = mosHTML::selectList( $folders, 'dirPath', "class=\"inputbox\" size=\"1\" onchange=\"goUpDir()\" ", 'value', 'text', $listdir );

	HTML_Media::showMedia( $dirPath, $listdir );
}


/**
* Build imagelist
* @param string The image directory to display
*/
function listImages($listdir) {
	global $mosConfig_live_site;

	// get list of images
	$d = @dir( COM_MEDIA_BASE . DIRECTORY_SEPARATOR .$listdir);

	if($d) {
		//var_dump($d);
		$images 	= array();
		$folders 	= array();
		$docs 		= array();
		$allowable 	= 'xcf|odg|gif|jpg|png|bmp';

		while (false !== ($entry = $d->read())) {
			$img_file = $entry;
			if(is_file( COM_MEDIA_BASE .$listdir.'/'.$img_file) && substr($entry,0,1) != '.' && strtolower($entry) !== 'index.html') {
				if (eregi( $allowable, $img_file )) {
					$image_info = @getimagesize( COM_MEDIA_BASE ."/".$listdir.'/'.$img_file);
					$file_details['file'] = COM_MEDIA_BASE . $listdir."/".$img_file;
					$file_details['img_info'] = $image_info;
					$file_details['size'] = filesize( COM_MEDIA_BASE .$listdir."/".$img_file);
					$images[$entry] = $file_details;
				} else {
					// file is document
					$file_details['size'] = filesize( COM_MEDIA_BASE .$listdir."/".$img_file);
					$file_details['file'] = COM_MEDIA_BASE .$listdir."/".$img_file;
					//$docs[$entry] = $img_file;
					$docs[$entry] = $file_details;
				}
			} else if(is_dir( COM_MEDIA_BASE ."/".$listdir.'/'.$img_file) && substr($entry,0,1) != '.' && strtolower($entry) !== 'cvs') {
				$folders[$entry] = $img_file;
			}
		}
		$d->close();

		HTML_Media::imageStyle($listdir);

		if(count($images) > 0 || count($folders) > 0 || count($docs) > 0) {
			//now sort the folders and images by name.
			ksort($images);
			ksort($folders);
			ksort($docs);


			HTML_Media::draw_table_header();

			for($i=0; $i<count($folders); $i++) {
				$folder_name = key($folders);
				HTML_Media::show_dir('/'.$folders[$folder_name], $folder_name,$listdir);
				next($folders);
			}

			for($i=0; $i<count($docs); $i++) {
				$doc_name = key($docs);
				$iconfile= $GLOBALS['mosConfig_absolute_path']."/administrator/components/com_media/images/".substr($doc_name,-3)."_16.png";
				if (file_exists($iconfile))	{
					$icon = "components/com_media/images/".(substr($doc_name,-3))."_16.png"	;
				} else {
					$icon = "components/com_media/images/con_info.png";
				}
				//HTML_Media::show_doc($docs[$doc_name], $listdir, $icon);
				HTML_Media::show_doc($doc_name, $docs[$doc_name]['size'],$listdir, $icon);
				next($docs);
			}

			for($i=0; $i<count($images); $i++) {
				$image_name = key($images);
				HTML_Media::show_image($images[$image_name]['file'], $image_name, $images[$image_name]['img_info'], $images[$image_name]['size'],$listdir);
				next($images);
			}

			HTML_Media::draw_table_footer();
		} else {
			HTML_Media::draw_no_results();
		}
	} else {
		HTML_Media::draw_no_dir();
	}
}

function rm_all_dir($dir) {
	//$dir = dir_name($dir);
	//echo "OPEN:".$dir.'<Br>';
	if(is_dir($dir)) {
		$d = @dir($dir);

		while ( false !== ( $entry = $d->read() ) ) {
			//echo "#".$entry.'<br>';
			if($entry != '.' && $entry != '..') {
				$node = $dir.'/'.$entry;
				//echo "NODE:".$node;
				if(is_file($node)) {
					//echo " - is file<br>";
					unlink($node);
				} else if(is_dir($node)) {
					//echo " -	is Dir<br>";
					rm_all_dir($node);
				}
			}
		}
		$d->close();

		rmdir($dir);
	}
	//echo "RM: $dir <br>";
}
?>
-matheus

User avatar
ghalleiras
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Thu Aug 18, 2005 1:31 pm
Location: Galicia

Re: Atualização Joomla! 1.0.4

Post by ghalleiras » Tue Nov 22, 2005 2:31 pm

Olá, eu actualicei uma zona de probas e dame un erro no pe da pagina, ejan:

Image

User avatar
bigodines
Joomla! Hero
Joomla! Hero
Posts: 2227
Joined: Thu Aug 18, 2005 11:10 am
Location: Floripa, Brazil
Contact:

Re: Atualização Joomla! 1.0.4

Post by bigodines » Wed Nov 23, 2005 4:11 pm

Ah sim, percisamos de um novo arquivo de idiomas pois algumas strings sao novas.... alguem se habilita?

User avatar
FaBMak
Joomla! Guru
Joomla! Guru
Posts: 611
Joined: Fri Aug 19, 2005 1:59 am
Location: Brasil
Contact:

Re: Atualização Joomla! 1.0.4

Post by FaBMak » Thu Nov 24, 2005 3:32 am

Done!  :P

Changelog:
* Adição de novos termos
* Alteração do XML para reconhecer o brazilian_portuguese.ignore.php e inclusão de uma mensagem descritiva do pacote durante a instalação.

Download: Novo Frontend Joomla! 1.0.4

FaBMak
Fabricio Elias Costa - Moderador do Joomla.org e Coordenador da Tradução Brasileira do Joomla!
Katipsoi Zunontee - http://ka-tips-oi-zu-non-tee.com/

User avatar
ghalleiras
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Thu Aug 18, 2005 1:31 pm
Location: Galicia

Re: Atualização Joomla! 1.0.4

Post by ghalleiras » Fri Nov 25, 2005 7:40 pm

Tenho un problema co Media Manager.

Ao tentar acesar as carpetas criadas por min como /images/stories/minhacarpeta dende a administraçao, dame erro seguinte:

Code: Select all

Configuration Problem: "" does not exist.
Sabem de que pode ser. Dende o editor eu tenho aceso as imagens e posso publicalas, mas non posso facer upload dende o media manager, ten q ser via FTP

Vizibelli
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 185
Joined: Mon Sep 12, 2005 2:27 pm

Re: Atualização Joomla! 1.0.4

Post by Vizibelli » Sat Nov 26, 2005 2:19 pm

A solução está aqui neste post, ou melhor, nesta pagina. Leia mais acima.  ;)

[]s
Ricardo

User avatar
ghalleiras
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Thu Aug 18, 2005 1:31 pm
Location: Galicia

Re: Atualização Joomla! 1.0.4

Post by ghalleiras » Sat Nov 26, 2005 3:20 pm

:-[ :-[ :-[ :-[ Estou dormido, o caso é que ja tinha ese arquivo colado  e listo para utilizar, mas non o fixen...Obrigado

User avatar
yurivs
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Nov 26, 2005 8:48 pm
Location: São Paulo -Brazil
Contact:

Re: Atualização Joomla! 1.0.4

Post by yurivs » Sat Nov 26, 2005 8:54 pm

Olá
Desculpe se a pergunta já foi efeita ene vezes (tenho sido mais escritor que webmaster), mas é possível passar diretamente do Mambo 4.5.2.3 para o Joomla 1.0.4? Ou preciso passar primeiro pela versão 1.0?
Valeu!
Yuri
____
http://karaloka.net

Vizibelli
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 185
Joined: Mon Sep 12, 2005 2:27 pm

Re: Atualização Joomla! 1.0.4

Post by Vizibelli » Sat Nov 26, 2005 8:59 pm

Acho que pode sim, mas nao vou te dar certeza.

Eu faria o seguinte. Instalava o 1.0 e depois pulava direto pro 1.0.4

Como sao arquivos pequenos, nao demora muito pra fazer isso.

[]s
Ricardo

vekiano
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 23, 2005 8:04 pm

Re: Atualização Joomla! 1.0.4

Post by vekiano » Mon Dec 05, 2005 2:13 pm

Sobre o erro acima, onde desaparecem os botões de próximoanterior... na paginação dentro da versão Joomla 1.0.4.
Ë necessário colocar no arquivo de idioma br_pt os seguintes comandos....

/** pageNavigation */
DEFINE('_PN_LT','<');
DEFINE('_PN_RT','>');

DEFINE('_PN_PAGE','Página');
DEFINE('_PN_OF','de');
DEFINE('_PN_START','Início');
DEFINE('_PN_PREVIOUS','Anterior');
DEFINE('_PN_NEXT','Próximo');
DEFINE('_PN_END','Fim');
DEFINE('_PN_DISPLAY_NR','Exibir #');
DEFINE('_PN_RESULTS','Resultados');


:D


Locked

Return to “Portuguese Forum”