diff --git a/net/phpldapadmin/Makefile b/net/phpldapadmin/Makefile index 8c3aab1a5506..cfaec82d2de4 100644 --- a/net/phpldapadmin/Makefile +++ b/net/phpldapadmin/Makefile @@ -1,62 +1,63 @@ PORTNAME= phpldapadmin DISTVERSION= 1.2.6.7 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} MAINTAINER= ports@bsdserwis.com COMMENT= PHP application to administer LDAP over the web WWW= https://github.com/leenooks/phpLDAPadmin/wiki LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE USES= cpe php:web,flavors tar:tgz CPE_VENDOR= phpldapadmin_project USE_GITHUB= yes GH_ACCOUNT= leenooks GH_PROJECT= phpLDAPadmin USE_PHP= gettext iconv ldap session xml NO_ARCH= yes NO_BUILD= yes OPTIONS_DEFINE= MCRYPT MCRYPT_DESC= Use pecl-mcrypt for password hashing MCRYPT_USE= PHP=mcrypt .include GROUPS?= ${WWWGRP} CFGDIR= config CFGFILE= config.php PLIST= ${WRKDIR}/plist PLIST_FILES= '@sample(,${GROUPS},640) ${WWWDIR_REL}/config/config.php.example ${WWWDIR_REL}/config/config.php' SUB_LIST+= PKGNAME=${PKGNAME} SUB_FILES+= pkg-message .SILENT: .include post-patch: cd ${WRKSRC} ; \ ${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore \ ! -name .gitignore ! -name *.orig | ${SORT} \ | ${SED} -e "s!^\.!${WWWDIR_REL}!" >${PLIST} ; do-install: cd ${WRKSRC} ; \ for src in $$( ${FIND} . ! -name .cvsignore \ ! -name .gitignore ! -name *.orig) ; do \ dst=${STAGEDIR}${WWWDIR}$${src#.} ; \ if ${TEST} -d $$src ; then \ ${MKDIR} $$dst ; \ else \ ${INSTALL_DATA} $$src $$dst ; \ fi \ done .include diff --git a/net/phpldapadmin/files/patch-lib_Query.php b/net/phpldapadmin/files/patch-lib_Query.php new file mode 100644 index 000000000000..83a842bf4901 --- /dev/null +++ b/net/phpldapadmin/files/patch-lib_Query.php @@ -0,0 +1,17 @@ +--- lib/Query.php.orig 2024-01-10 22:23:54 UTC ++++ lib/Query.php +@@ -15,6 +15,14 @@ class Query extends xmlTemplate { + class Query extends xmlTemplate { + protected $description = ''; + public $results = array(); ++ public $base = ""; ++ public $dn = ""; ++ public $filter = ""; ++ public $icon = ""; ++ public $resultsdata = array(); ++ public $scope = ""; ++ public $title = ""; ++ public $visible = ""; + + /** + * Main processing to store the template. diff --git a/net/phpldapadmin/files/patch-lib_import__functions.php b/net/phpldapadmin/files/patch-lib_import__functions.php index 2ff2d7bd82a5..1050a3d20069 100644 --- a/net/phpldapadmin/files/patch-lib_import__functions.php +++ b/net/phpldapadmin/files/patch-lib_import__functions.php @@ -1,70 +1,11 @@ ---- lib/import_functions.php.orig 2024-01-10 22:23:54 UTC +--- lib/import_functions.php.orig 2025-05-26 10:22:02 UTC +++ lib/import_functions.php -@@ -257,7 +257,7 @@ class ImportLDIF extends Import { - if (substr($value,0,1) == ':') - $value = base64_decode(trim(substr($value,1))); - else -- $value = trim($value); -+ $value = trim((string) $value); +@@ -147,6 +147,8 @@ class ImportLDIF extends Import { + class ImportLDIF extends Import { + private $_currentLineNumber = 0; + private $_currentLine = ''; ++ private $_currentDnLine = ''; ++ private $dnLineNumber = 0; + private $template; + public $error = array(); - return array($attr,$value); - } -@@ -273,7 +273,7 @@ class ImportLDIF extends Import { - - if ($this->hasMoreEntries() && ! $this->eof()) { - # The first line is the DN one -- $current[0]= trim($this->_currentLine); -+ $current[0]= trim((string) $this->_currentLine); - - # While we end on a blank line, fetch the attribute lines - $count = 0; -@@ -284,11 +284,11 @@ class ImportLDIF extends Import { - /* If the next line begin with a space, we append it to the current row - * else we push it into the array (unwrap)*/ - if ($this->isWrappedLine()) -- $current[$count] .= trim($this->_currentLine); -+ $current[$count] .= trim((string) $this->_currentLine); - elseif ($this->isCommentLine()) {} - # Do nothing - elseif (! $this->isBlankLine()) -- $current[++$count] = trim($this->_currentLine); -+ $current[++$count] = trim((string) $this->_currentLine); - else - $endEntryFound = true; - } -@@ -338,7 +338,7 @@ class ImportLDIF extends Import { - * @return boolean true if it's a comment line,false otherwise - */ - private function isCommentLine() { -- return substr(trim($this->_currentLine),0,1) == '#' ? true : false; -+ return substr(trim((string) $this->_currentLine),0,1) == '#' ? true : false; - } - - /** -@@ -356,7 +356,7 @@ class ImportLDIF extends Import { - * @return boolean if it is a blank line,false otherwise. - */ - private function isBlankLine() { -- return(trim($this->_currentLine) == '') ? true : false; -+ return(trim((string) $this->_currentLine) == '') ? true : false; - } - - /** -@@ -388,7 +388,7 @@ class ImportLDIF extends Import { - $url = trim(substr($value,1)); - - if (preg_match('^file://',$url)) { -- $filename = substr(trim($url),7); -+ $filename = substr(trim((string) $url),7); - - if ($fh = @fopen($filename,'rb')) { - if (! $return = @fread($fh,filesize($filename))) -@@ -482,7 +482,7 @@ class ImportLDIF extends Import { - # Fetch the attribute for the following line - $currentLine = array_shift($lines); - -- while ($processline && trim($currentLine) && (trim($currentLine) != '-')) { -+ while ($processline && trim((string) $currentLine) && (trim((string) $currentLine) != '-')) { - $processline = false; - - # If there is a valid line diff --git a/net/phpldapadmin/files/patch-lib_xml2array.php b/net/phpldapadmin/files/patch-lib_xml2array.php new file mode 100644 index 000000000000..c83ee9cd53c3 --- /dev/null +++ b/net/phpldapadmin/files/patch-lib_xml2array.php @@ -0,0 +1,26 @@ +--- lib/xml2array.php.orig 2024-01-10 22:23:54 UTC ++++ lib/xml2array.php +@@ -20,6 +20,7 @@ class xml2array { + var $arrOutput = array(); + var $resParser; + var $strXmlData; ++ // var $parser; + + private function push_pos(&$pos) { + $this->stack[count($this->stack)] = &$pos; +@@ -33,10 +34,12 @@ class xml2array { + + public function parseXML($strInputXML,$filename) { + $this->resParser = xml_parser_create(); +- xml_set_object($this->resParser,$this); +- xml_set_element_handler($this->resParser,'tagOpen','tagClosed'); ++ // xml_set_object($this->resParser,$this); ++ // xml_set_element_handler($this->resParser,'tagOpen','tagClosed'); + +- xml_set_character_data_handler($this->resParser,'tagData'); ++ // xml_set_character_data_handler($this->resParser,'tagData'); ++ xml_set_element_handler($this->resParser, array( $this, 'tagOpen' ), array( $this, 'tagClosed' ) ); ++ xml_set_character_data_handler( $this->resParser, array( $this, 'tagData' )); + + $this->push_pos($this->arrOutput); +