summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprotegh <protegh@users.noreply.github.com>2023-07-28 11:03:19 +0200
committerViorel Munteanu <ceamac@gentoo.org>2023-08-10 10:36:47 +0300
commit0d8195b182b463c2b061f3c884301bd520b8b10e (patch)
tree5232b87596b8dfd47f8d448f8a89088bb6945cc0 /net-nds
parentkde-plasma/powerdevil: Keyword 5.27.7-r1 riscv, #911552 (diff)
downloadgentoo-0d8195b182b463c2b061f3c884301bd520b8b10e.tar.gz
gentoo-0d8195b182b463c2b061f3c884301bd520b8b10e.tar.bz2
gentoo-0d8195b182b463c2b061f3c884301bd520b8b10e.zip
net-nds/phpldapadmin: add 1.2.6.6
The phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch fixes an error you get under php-8.1 when "$server->getContainer($base->getDN())" returns a null object (that's the case if you have a short, one component, rootdn in your "$servers->setValue('server','base',array(...)" config. Closes: https://bugs.gentoo.org/897680 Signed-off-by: protegh <protegh@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/32081 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/phpldapadmin/Manifest1
-rw-r--r--net-nds/phpldapadmin/files/phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch16
-rw-r--r--net-nds/phpldapadmin/phpldapadmin-1.2.6.6.ebuild61
3 files changed, 78 insertions, 0 deletions
diff --git a/net-nds/phpldapadmin/Manifest b/net-nds/phpldapadmin/Manifest
index 8a9d4ecfcc2b..ddd5d167e0a9 100644
--- a/net-nds/phpldapadmin/Manifest
+++ b/net-nds/phpldapadmin/Manifest
@@ -1 +1,2 @@
DIST phpldapadmin-1.2.6.3.tar.gz 1130061 BLAKE2B d1183a89db659eeadbf33632edabb1f24d855eea3f37d36128b5a4262a4979f1fa1f963b2d1e43c4d07c988899a7c4cfb72a6f88e13ee5a830654686eaecf183 SHA512 66aeb81c812830968df5d3a2f0ccdd479fe5d7ed3bb729c0fb9991d3efa20263a493b38bfe48c99ad2c93c2ee549f51f53e064fb1381bc7e126ca2ad2bfc3167
+DIST phpldapadmin-1.2.6.6.tar.gz 1132820 BLAKE2B e153d9ac3e844a1a08235c43a096a7418a2d67128bc216fe09f7a00c4f4bdf39e7646842d0c0189c5c42beb3a7823959c7d5fa21b8721f96d0204f87e9b16aad SHA512 398bb6c36a3c9b64016bebc6debeaf8048c4b6b9ebdc7a2bfa8acfa4d4458990a0a59d4e32a2abef772baba667dd495309eff2d68e39847f25a50ad79a06984d
diff --git a/net-nds/phpldapadmin/files/phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch b/net-nds/phpldapadmin/files/phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch
new file mode 100644
index 000000000000..0e6ae997fc48
--- /dev/null
+++ b/net-nds/phpldapadmin/files/phpldapadmin-1.2.6.4-getDN-htmlspecialchars.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/897680
+
+This fixes an error you get under php-8.1 when "$server->getContainer($base->getDN())"
+returns a null object (that's the case if you have a short, one component, rootdn in your
+"$servers->setValue('server','base',array(...)" config.
+--- a/lib/HTMLTree.php
++++ b/lib/HTMLTree.php
+@@ -98,7 +98,7 @@
+ $this->javascript .= '<div>';
+ $this->javascript .= '<input type="hidden" name="cmd" value="template_engine" />';
+ $this->javascript .= sprintf('<input type="hidden" name="server_id" value="%s" />',$server->getIndex());
+- $this->javascript .= sprintf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($server->getContainer($base->getDN())));
++ $this->javascript .= sprintf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($server->getContainer($base->getDN()) ?? ''));
+ $this->javascript .= sprintf('<input type="hidden" name="rdn" value="%s" />',get_rdn($base->getDN()));
+ $this->javascript .= sprintf('<input type="hidden" name="rdn_attribute[]" value="%s" />',$rdn[0]);
+ $this->javascript .= sprintf('<input type="hidden" name="new_values[%s][]" value="%s" />',$rdn[0],$rdn[1]);
diff --git a/net-nds/phpldapadmin/phpldapadmin-1.2.6.6.ebuild b/net-nds/phpldapadmin/phpldapadmin-1.2.6.6.ebuild
new file mode 100644
index 000000000000..2ab8d8eb0bf6
--- /dev/null
+++ b/net-nds/phpldapadmin/phpldapadmin-1.2.6.6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit webapp
+
+MY_PN="phpLDAPadmin"
+DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server"
+HOMEPAGE="https://github.com/leenooks/phpLDAPadmin"
+SRC_URI="https://github.com/leenooks/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+
+RDEPEND="
+ >=dev-lang/php-8.0[hash(+),ldap,session,xml,nls]
+ dev-libs/openssl:=
+ virtual/httpd-php
+"
+BDEPEND="
+ media-libs/libpng
+"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.2.1.1-fix-magic-quotes.patch"
+ "${FILESDIR}/${PN}-1.2.6.2-r1-default-templates.patch"
+ "${FILESDIR}/${PN}-1.2.6.4-getDN-htmlspecialchars.patch"
+)
+
+need_httpd_cgi
+
+src_prepare() {
+ has_version "dev-libs/openssl:0/1.1" && \
+ eapply "${FILESDIR}/${PN}-1.2.6.5-openssl-1.patch"
+ mv config/config.php.example config/config.php || die
+ default
+ # fix QA notice about broken IDAT window length
+ pngfix --out=network.png htdocs/images/default/network.png || die
+ pngfix --out=document.png htdocs/images/default/document.png || die
+ mv -f network.png document.png htdocs/images/default/ || die
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc INSTALL.md
+
+ # Restrict config file access - bug 280836
+ chown root:apache "config/config.php"
+ chmod 640 "config/config.php"
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ webapp_configfile "${MY_HTDOCSDIR}/config/config.php"
+ webapp_postinst_txt en "${FILESDIR}"/postinstall2-en.txt
+
+ webapp_src_install
+}