Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Thu Sep 01 2022
rubo77 - fix CVE-2020-13565: sanitize URL
Thu Aug 25 2022
rubo77 - Adapt to PHP 8.2
rubo77 - Update ADODB to v5.20.20
rubo77 - work around missing get- and set_magic_quotes_runtime()
rubo77 - Lite.php 376 2004-11-08
rubo77 - update adodb to SVN Revision 425
rubo77 - Merge remote-tracking branch 'origin/master' from github @IPSO
mikeb - Switch from CVS to SVN on sourceforge.net
Tue Sep 05 2006
mikeb - Release version 3.3.7
Mon Sep 04 2006
Expand Down Expand Up @@ -26,7 +36,7 @@ Thu Sep 22 2005
Wed Sep 21 2005
mikeb - Addslashes to JS creation code in assign_group.php.
Thu Sep 08 2005
mikeb - Added support for MS-SQL in setup.php, thanks to Fran�ois Tissandier <francois.tissandier@tebu-bio.com>
mikeb - Added support for MS-SQL in setup.php, thanks to François Tissandier <francois.tissandier@tebu-bio.com>
Sat Sep 03 2005
mikeb - Fixed typo in manual
mikeb - Fixed comments in gacl.class.php
Expand All @@ -36,7 +46,7 @@ Mon Aug 22 2005
Thu Aug 04 2005
mikeb - Fixed bug with config ini file path in setup.php
Thu Jul 28 2005
mikeb - Fixed bug with double/single quotes on line 3526. J�r�my Cohen Solal <jeremy@eiole.com>
mikeb - Fixed bug with double/single quotes on line 3526. Jérémy Cohen Solal <jeremy@eiole.com>
Sun Jul 24 2005
mikeb - Removed table prefix comment regarding not using "_". Apparently it works now
mikeb - Fixed comments in gacl.class.php regarding group IDs, it now correctly says group values.
Expand Down
4 changes: 2 additions & 2 deletions Cache_Lite/Hashed_Cache_Lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _create_dir_structure($dir)
{
if (!@file_exists($dir)) {
$dir_parts = preg_split('![\/]+!', $dir, -1, PREG_SPLIT_NO_EMPTY);
$new_dir = ($dir{0} == DIR_SEP) ? DIR_SEP : '';
$new_dir = ($dir[0] == DIR_SEP) ? DIR_SEP : '';
foreach ($dir_parts as $dir_part) {
$new_dir .= $dir_part;
if (!file_exists($new_dir) && !mkdir($new_dir, 0771)) {
Expand Down Expand Up @@ -145,7 +145,7 @@ function clean($group = false)
unset($this->_memoryCachingArray[$key]);
}
}
$this->_memoryCachingCounter = count($this->_memoryCachingArray);
$this->_memoryCachingCounter = phpgacl_legacy_count($this->_memoryCachingArray);
if ($this->_onlyMemoryCaching) {
return true;
}
Expand Down
10 changes: 5 additions & 5 deletions Cache_Lite/Lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @package Cache_Lite
* @category Caching
* @version $Id$
* @version $Id: Lite.php 376 2004-11-08 00:47:05Z ipso $
* @author Fabien MARTY <fab@php.net>
*/

Expand Down Expand Up @@ -366,7 +366,7 @@ function clean($group = false)
$motif = ($group) ? 'cache_'.$group.'_' : 'cache_';
}
if ($this->_memoryCaching) {
while (list($key, $value) = each($this->_memoryCachingArray)) {
foreach($this->_memoryCachingArray as $key=>$value) {
if (strpos($key, $motif, 0)) {
unset($this->_memoryCachingArray[$key]);
$this->_memoryCachingCounter = $this->_memoryCachingCounter - 1;
Expand Down Expand Up @@ -526,14 +526,14 @@ function _read()
if ($fp) {
clearstatcache(); // because the filesize can be cached by PHP itself...
$length = @filesize($this->_file);
$mqr = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
$mqr = (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime());
if(function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime(0);
if ($this->_readControl) {
$hashControl = @fread($fp, 32);
$length = $length - 32;
}
$data = @fread($fp, $length);
set_magic_quotes_runtime($mqr);
if(function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime($mqr);
if ($this->_fileLocking) @flock($fp, LOCK_UN);
@fclose($fp);
if ($this->_readControl) {
Expand Down
4 changes: 2 additions & 2 deletions admin/acl_test2.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
echo("</pre>");
*/

$total_rows = count($rows);
$total_rows = phpgacl_legacy_count($rows);

while (list(,$row) = @each(&$rows)) {
foreach($rows as $row) {
list( $aco_section_value,
$aco_section_name,
$aco_value,
Expand Down
4 changes: 2 additions & 2 deletions admin/acl_test3.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
echo("</pre>");
*/

$total_rows = count($rows);
$total_rows = phpgacl_legacy_count($rows);

while (list(,$row) = @each(&$rows)) {
foreach($rows as $row) {
list( $aco_section_value,
$aco_section_name,
$aco_value,
Expand Down
9 changes: 4 additions & 5 deletions admin/assign_group.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@

//Parse the form values
//foreach ($_POST['delete_assigned_aro'] as $aro_value) {
while (list(,$object_value) = @each($_POST['delete_assigned_object'])) {
foreach($_POST['delete_assigned_object'] as $object_value) {
$split_object_value = explode('^', $object_value);
$selected_object_array[$split_object_value[0]][] = $split_object_value[1];
}

//Insert Object -> GROUP mappings
while (list($object_section_value,$object_array) = @each($selected_object_array)) {
foreach($selected_object_array as $object_section_value=>$object_array) {
$gacl_api->debug_text('Assign: Object ID: '. $object_section_value .' to Group: '. $_POST['group_id']);

foreach ($object_array as $object_value) {
Expand All @@ -56,14 +56,13 @@

//showarray($_POST['selected_'.$_POST['group_type']]);
//Parse the form values
//foreach ($_POST['selected_aro'] as $aro_value) {
while (list(,$object_value) = @each($_POST['selected_'.$_POST['group_type']])) {
foreach ($_POST['selected_'.$_POST['group_type']] as $object_value) {
$split_object_value = explode('^', $object_value);
$selected_object_array[$split_object_value[0]][] = $split_object_value[1];
}

//Insert ARO -> GROUP mappings
while (list($object_section_value,$object_array) = @each($selected_object_array)) {
foreach($selected_object_array as $object_section_value=>$object_array) {
$gacl_api->debug_text('Assign: Object ID: '. $object_section_value .' to Group: '. $_POST['group_id']);

foreach ($object_array as $object_value) {
Expand Down
4 changes: 2 additions & 2 deletions admin/edit_group.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
case 'Delete':
$gacl_api->debug_text('Delete');

if (count($_POST['delete_group']) > 0) {
if (phpgacl_legacy_count($_POST['delete_group']) > 0) {
//Always reparent children when deleting a group.
foreach ($_POST['delete_group'] as $group_id) {
$gacl_api->debug_text('Deleting group_id: '. $group_id);
Expand All @@ -41,7 +41,7 @@
}
}

if (count($retry) > 0) {
if (phpgacl_legacy_count($retry) > 0) {
foreach($retry as $group_id) {
$gacl_api->del_group($group_id, TRUE, $group_type);
}
Expand Down
8 changes: 4 additions & 4 deletions admin/edit_object_sections.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
switch ($_POST['action']) {
case 'Delete':

if (count($_POST['delete_sections']) > 0) {
if (phpgacl_legacy_count($_POST['delete_sections']) > 0) {
foreach($_POST['delete_sections'] as $id) {
$gacl_api->del_object_section($id, $object_type, TRUE);
}
Expand All @@ -48,7 +48,7 @@
$gacl_api->debug_text("Submit!!");

//Update sections
while (list(,$row) = @each($_POST['sections'])) {
foreach($_POST['sections'] as $row) {
list($id, $value, $order, $name) = $row;
$gacl_api->edit_object_section($id, $name, $value, $order,0,$object_type );
}
Expand All @@ -58,7 +58,7 @@
unset($name);

//Insert new sections
while (list(,$row) = @each($_POST['new_sections'])) {
foreach($_POST['new_sections'] as $row) {
list($value, $order, $name) = $row;

if (!empty($value) AND !empty($order) AND !empty($name)) {
Expand All @@ -79,7 +79,7 @@

$sections = array();

while (list(,$row) = @each($rows)) {
foreach($rows as $row) {
list($id, $value, $order_value, $name) = $row;

$sections[] = array(
Expand Down
8 changes: 4 additions & 4 deletions admin/edit_objects.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
switch ($_POST['action']) {
case 'Delete':

if (count($_POST['delete_object']) > 0) {
if (phpgacl_legacy_count($_POST['delete_object']) > 0) {
foreach($_POST['delete_object'] as $id) {
$gacl_api->del_object($id, $object_type, TRUE);
}
Expand All @@ -47,7 +47,7 @@
$gacl_api->debug_text("Submit!!");

//Update objects
while (list(,$row) = @each($_POST['objects'])) {
foreach($_POST['objects'] as $row) {
list($id, $value, $order, $name) = $row;
$gacl_api->edit_object($id, $_POST['section_value'], $name, $value, $order, 0, $object_type);
}
Expand All @@ -58,7 +58,7 @@
unset($name);

//Insert new sections
while (list(,$row) = @each($_POST['new_objects'])) {
foreach($_POST['new_objects'] as $row) {
list($value, $order, $name) = $row;

if (!empty($value) AND !empty($name)) {
Expand Down Expand Up @@ -86,7 +86,7 @@
$rs = $db->pageexecute($query, $gacl_api->_items_per_page, $_GET['page']);
$rows = $rs->GetRows();

while (list(,$row) = @each($rows)) {
foreach($rows as $row) {
list($id, $section_value, $value, $order_value, $name) = $row;

$objects[] = array(
Expand Down
2 changes: 2 additions & 0 deletions admin/gacl_admin_api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ function return_page($url="") {
}

if (!$debug OR $debug==0) {
# fix CVE-2020-13565: sanitize URL
$url=preg_replace('/^([a-z0-9\s%;\+]+:\/\/+)+/i','',$url);
header("Location: $url\n\n");
} else {
$this->debug_text("return_page(): URL: $url -- Referer: $_SERVER[HTTP_REFERRER]");
Expand Down
6 changes: 3 additions & 3 deletions admin/object_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function array_walk_trim(&$array_field) {
$exploded_value_search_str = explode("\n", $value_search_str);
$exploded_name_search_str = explode("\n", $name_search_str);

if (count($exploded_value_search_str) > 1 OR count($exploded_name_search_str) > 1) {
if (phpgacl_legacy_count($exploded_value_search_str) > 1 OR phpgacl_legacy_count($exploded_name_search_str) > 1) {
//Given a list, lets try to match all lines in it.
array_walk($exploded_value_search_str, 'array_walk_trim');
array_walk($exploded_name_search_str, 'array_walk_trim');
Expand All @@ -45,15 +45,15 @@ function array_walk_trim(&$array_field) {
WHERE section_value='. $db->qstr($_GET['section_value']) .'
AND (';

if (count($exploded_value_search_str) > 1) {
if (phpgacl_legacy_count($exploded_value_search_str) > 1) {
$query .= 'lower(value) IN ('. implode(',', $exploded_value_search_str) .')';
} else {
$query .= 'lower(value) LIKE ' . $db->qstr($value_search_str);
}

$query .= ' OR ';

if (count($exploded_name_search_str) > 1) {
if (phpgacl_legacy_count($exploded_name_search_str) > 1) {
$query .= 'lower(name) IN ('. implode(',', $exploded_name_search_str) .')';
} else {
$query .= 'lower(name) LIKE ' . $db->qstr($name_search_str);
Expand Down
4 changes: 2 additions & 2 deletions admin/smarty/libs/plugins/function.fetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ function smarty_function_fetch($params, &$smarty)
$content .= fgets($fp,4096);
}
fclose($fp);
$csplit = split("\r\n\r\n",$content,2);
$csplit = explode("\r\n\r\n",$content,2);

$content = $csplit[1];

if(!empty($params['assign_headers'])) {
$smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
$smarty->assign($params['assign_headers'],explode("\r\n",$csplit[0]));
}
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions adodb/.mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Andreas Fernandez <a.fernandez@scripting-base.de> <andreas.fernandez@aspedia.de>
Mike Benoit <mikeb@timetrex.com> MikeB <ipso@snappymail.ca>
Mike Benoit <mikeb@timetrex.com> mike.benoit

Loading