pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang Add pkgsrc build option disable-filter-url to dis...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dd8dcaef2df9
branches: trunk
changeset: 382934:dd8dcaef2df9
user: manu <manu%pkgsrc.org@localhost>
date: Wed Jul 18 07:33:12 2018 +0000
description:
Add pkgsrc build option disable-filter-url to disable php://filter URL
php://filter URL is a feature documented here:
http://php.net/manual/en/wrappers.php.php
Unfortunately, it allows remote control of include() behavior
beyond what many developpers expected, enabling easy dump of
PHP source files. The administrator may want to disable the
feature for security sake, and this option makes that possible.
diffstat:
lang/php56/Makefile.php | 8 +++++-
lang/php56/distinfo | 3 +-
lang/php56/patches/patch-disable-filter-url | 34 +++++++++++++++++++++++++++++
lang/php70/Makefile.php | 8 +++++-
lang/php70/distinfo | 3 +-
lang/php70/patches/patch-disable-filter-url | 34 +++++++++++++++++++++++++++++
lang/php71/Makefile.php | 8 +++++-
lang/php71/distinfo | 3 +-
lang/php71/patches/patch-disable-filter-url | 34 +++++++++++++++++++++++++++++
lang/php72/Makefile.php | 7 +++++-
lang/php72/distinfo | 3 +-
lang/php72/patches/patch-disable-filter-url | 34 +++++++++++++++++++++++++++++
12 files changed, 168 insertions(+), 11 deletions(-)
diffs (truncated from 330 to 300 lines):
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php56/Makefile.php
--- a/lang/php56/Makefile.php Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php56/Makefile.php Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.4 2017/07/12 09:11:35 manu Exp $
+# $NetBSD: Makefile.php,v 1.5 2018/07/18 07:33:12 manu Exp $
# used by lang/php56/Makefile
# used by www/ap-php/Makefile
# used by www/php-fpm/Makefile
@@ -42,7 +42,7 @@
.include "../../textproc/libxml2/buildlink3.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
-PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline
+PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline disable-filter-url
PKG_SUGGESTED_OPTIONS+= inet6 ssl
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
@@ -89,5 +89,9 @@
INSTALL_MAKE_FLAGS+= -r
.endif
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+= -DDISABLE_FILTER_URL
+.endif
+
DL_AUTO_VARS= yes
.include "../../mk/dlopen.buildlink3.mk"
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php56/distinfo
--- a/lang/php56/distinfo Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php56/distinfo Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.48 2018/04/29 16:26:40 taca Exp $
+$NetBSD: distinfo,v 1.49 2018/07/18 07:33:12 manu Exp $
SHA1 (php-5.6.36.tar.bz2) = c5cf00d9d6e212e1d10cfd45adbe73c936312e43
RMD160 (php-5.6.36.tar.bz2) = 91d662d8dba9cd6ed9b14244afcae4c12c25ff01
@@ -6,6 +6,7 @@
Size (php-5.6.36.tar.bz2) = 15057704 bytes
SHA1 (patch-acinclude.m4) = 34d38d2538cc00932cdfcc80d1d4a91632cd15d0
SHA1 (patch-configure) = a5623b0cbb3331fd0a537b26c0ae48315d52dbe2
+SHA1 (patch-disable-filter-url) = a2b08912d81f2872bf1834fa4cefddb044c9d0f8
SHA1 (patch-ext_gd_config.m4) = b92ab4c7fe8aceaef7787a607a7d2eac258fee19
SHA1 (patch-ext_imap_config.m4) = 9c6ed6966366c4fe1b7cfd34b5910e2ff0e68577
SHA1 (patch-ext_mssql_php__mssql.c) = c4fa9231dc539ffb027f1beb6f182f21ddb94a3c
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php56/patches/patch-disable-filter-url
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php56/patches/patch-disable-filter-url Wed Jul 18 07:33:12 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-disable-filter-url,v 1.1 2018/07/18 07:33:12 manu Exp $
+
+Add build-time disable option for dangerous php://filter URL
+
+php://filter URL is a feature documented here:
+http://php.net/manual/en/wrappers.php.php
+
+Unfortunately, it allows remote control of include() behavior
+beyond what many developpers expected, enabling easy dump of
+PHP source files. The administrator may want to disable the
+feature for security sake, and this patch makes that possible.
+
+--- ./ext/standard/php_fopen_wrapper.c.orig
++++ ./ext/standard/php_fopen_wrapper.c
+@@ -333,8 +333,9 @@
+ "Error duping file descriptor %ld; possibly it doesn't exist: "
+ "[%d]: %s", fildes_ori, errno, strerror(errno));
+ return NULL;
+ }
++#ifndef DISABLE_FILTER_URL
+ } else if (!strncasecmp(path, "filter/", 7)) {
+ /* Save time/memory when chain isn't specified */
+ if (strchr(mode, 'r') || strchr(mode, '+')) {
+ mode_rw |= PHP_STREAM_FILTER_READ;
+@@ -369,8 +370,9 @@
+ }
+ efree(pathdup);
+
+ return stream;
++#endif /* !DISABLE_FILTER_URL */
+ } else {
+ /* invalid php://thingy */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid php:// URL specified");
+ return NULL;
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php70/Makefile.php
--- a/lang/php70/Makefile.php Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php70/Makefile.php Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.8 2018/07/16 10:58:50 maya Exp $
+# $NetBSD: Makefile.php,v 1.9 2018/07/18 07:33:12 manu Exp $
# used by lang/php70/Makefile
# used by www/ap-php/Makefile
# used by www/php-fpm/Makefile
@@ -40,7 +40,7 @@
.include "../../textproc/libxml2/buildlink3.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
-PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline
+PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline disable-filter-url
PKG_SUGGESTED_OPTIONS+= inet6 ssl readline
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
@@ -87,5 +87,9 @@
INSTALL_MAKE_FLAGS+= -r
.endif
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+= -DDISABLE_FILTER_URL
+.endif
+
DL_AUTO_VARS= yes
.include "../../mk/dlopen.buildlink3.mk"
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php70/distinfo
--- a/lang/php70/distinfo Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php70/distinfo Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.45 2018/04/26 15:46:57 taca Exp $
+$NetBSD: distinfo,v 1.46 2018/07/18 07:33:12 manu Exp $
SHA1 (php-7.0.30.tar.bz2) = 774d76578f06e4acc035ed65692f7750f7d9c9b1
RMD160 (php-7.0.30.tar.bz2) = f3bf11cfb9d02988d1458d9b30a223af3191e970
@@ -6,6 +6,7 @@
Size (php-7.0.30.tar.bz2) = 14641553 bytes
SHA1 (patch-acinclude.m4) = 81a8f33a536500978ea5a9aa2d2875c61c843e56
SHA1 (patch-configure) = 68ca63d7623feee2f12c9e1abacf4a5d7827d96c
+SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c
SHA1 (patch-ext_gd_config.m4) = bde93678626592cdcee619189bfc6532d0913a76
SHA1 (patch-ext_imap_config.m4) = f4e10ab81697b72019313f63bc630627a08efd92
SHA1 (patch-ext_intl_config.m4) = 222e35fc2c3e9e559696293fdf66171f8abfca7f
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php70/patches/patch-disable-filter-url
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php70/patches/patch-disable-filter-url Wed Jul 18 07:33:12 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-disable-filter-url,v 1.1 2018/07/18 07:33:12 manu Exp $
+
+Add build-time disable option for dangerous php://filter URL
+
+php://filter URL is a feature documented here:
+http://php.net/manual/en/wrappers.php.php
+
+Unfortunately, it allows remote control of include() behavior
+beyond what many developpers expected, enabling easy dump of
+PHP source files. The administrator may want to disable the
+feature for security sake, and this patch makes that possible.
+
+--- ./ext/standard/php_fopen_wrapper.c.orig
++++ ./ext/standard/php_fopen_wrapper.c
+@@ -345,8 +345,9 @@
+ "Error duping file descriptor " ZEND_LONG_FMT "; possibly it doesn't exist: "
+ "[%d]: %s", fildes_ori, errno, strerror(errno));
+ return NULL;
+ }
++#ifndef DISABLE_FILTER_URL
+ } else if (!strncasecmp(path, "filter/", 7)) {
+ /* Save time/memory when chain isn't specified */
+ if (strchr(mode, 'r') || strchr(mode, '+')) {
+ mode_rw |= PHP_STREAM_FILTER_READ;
+@@ -382,8 +383,9 @@
+ }
+ efree(pathdup);
+
+ return stream;
++#endif /* !DISABLE_FILTER_URL */
+ } else {
+ /* invalid php://thingy */
+ php_error_docref(NULL, E_WARNING, "Invalid php:// URL specified");
+ return NULL;
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php71/Makefile.php
--- a/lang/php71/Makefile.php Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php71/Makefile.php Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.7 2018/07/16 10:58:50 maya Exp $
+# $NetBSD: Makefile.php,v 1.8 2018/07/18 07:33:12 manu Exp $
# used by lang/php71/Makefile
# used by www/ap-php/Makefile
# used by www/php-fpm/Makefile
@@ -40,7 +40,7 @@
.include "../../textproc/libxml2/buildlink3.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
-PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline
+PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline disable-filter-url
PKG_SUGGESTED_OPTIONS+= inet6 ssl readline
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
@@ -87,5 +87,9 @@
INSTALL_MAKE_FLAGS+= -r
.endif
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+= -DDISABLE_FILTER_URL
+.endif
+
DL_AUTO_VARS= yes
.include "../../mk/dlopen.buildlink3.mk"
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php71/distinfo
--- a/lang/php71/distinfo Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php71/distinfo Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2018/06/25 15:19:22 taca Exp $
+$NetBSD: distinfo,v 1.39 2018/07/18 07:33:12 manu Exp $
SHA1 (php-7.1.19.tar.bz2) = 2010c911e34ec01e94697567d13eb29e49ac3045
RMD160 (php-7.1.19.tar.bz2) = f8fbc7f0218954938fe5b37b91160fe093839288
@@ -6,6 +6,7 @@
Size (php-7.1.19.tar.bz2) = 15147029 bytes
SHA1 (patch-acinclude.m4) = b682280fd89950c082c2226bdb7364b0dc475bad
SHA1 (patch-configure) = 862707ff3fd8b8d7312104bb44a48fe8379951bd
+SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c
SHA1 (patch-ext_gd_config.m4) = 93b62daad93b9ee6dc28e06016f739bc26b0dc9f
SHA1 (patch-ext_imap_config.m4) = f4e10ab81697b72019313f63bc630627a08efd92
SHA1 (patch-ext_intl_config.m4) = 5192f8e8fa32939c62a734421463edd294372282
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php71/patches/patch-disable-filter-url
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php71/patches/patch-disable-filter-url Wed Jul 18 07:33:12 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-disable-filter-url,v 1.1 2018/07/18 07:33:12 manu Exp $
+
+Add build-time disable option for dangerous php://filter URL
+
+php://filter URL is a feature documented here:
+http://php.net/manual/en/wrappers.php.php
+
+Unfortunately, it allows remote control of include() behavior
+beyond what many developpers expected, enabling easy dump of
+PHP source files. The administrator may want to disable the
+feature for security sake, and this patch makes that possible.
+
+--- ./ext/standard/php_fopen_wrapper.c.orig
++++ ./ext/standard/php_fopen_wrapper.c
+@@ -345,8 +345,9 @@
+ "Error duping file descriptor " ZEND_LONG_FMT "; possibly it doesn't exist: "
+ "[%d]: %s", fildes_ori, errno, strerror(errno));
+ return NULL;
+ }
++#ifndef DISABLE_FILTER_URL
+ } else if (!strncasecmp(path, "filter/", 7)) {
+ /* Save time/memory when chain isn't specified */
+ if (strchr(mode, 'r') || strchr(mode, '+')) {
+ mode_rw |= PHP_STREAM_FILTER_READ;
+@@ -382,8 +383,9 @@
+ }
+ efree(pathdup);
+
+ return stream;
++#endif /* !DISABLE_FILTER_URL */
+ } else {
+ /* invalid php://thingy */
+ php_error_docref(NULL, E_WARNING, "Invalid php:// URL specified");
+ return NULL;
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php72/Makefile.php
--- a/lang/php72/Makefile.php Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php72/Makefile.php Wed Jul 18 07:33:12 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.5 2018/07/16 10:58:50 maya Exp $
+# $NetBSD: Makefile.php,v 1.6 2018/07/18 07:33:12 manu Exp $
# used by lang/php72/Makefile
# used by www/ap-php/Makefile
# used by www/php-fpm/Makefile
@@ -46,6 +46,7 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.${PHP_PKG_PREFIX}
PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline argon2 sqlite3
+PKG_SUPPORTED_OPTIONS+= disable-filter-url
PKG_SUGGESTED_OPTIONS+= inet6 ssl readline sqlite3
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
@@ -104,5 +105,9 @@
CONFIGURE_ARGS+= --without-sqlite3
.endif
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+= -DDISABLE_FILTER_URL
+.endif
+
DL_AUTO_VARS= yes
.include "../../mk/dlopen.buildlink3.mk"
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php72/distinfo
--- a/lang/php72/distinfo Wed Jul 18 07:20:53 2018 +0000
+++ b/lang/php72/distinfo Wed Jul 18 07:33:12 2018 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.26 2018/06/24 10:34:47 taca Exp $
+$NetBSD: distinfo,v 1.27 2018/07/18 07:33:12 manu Exp $
SHA1 (php-7.2.7.tar.bz2) = e56adc671e9a19bcbe2b84e510cd2c2cec571970
RMD160 (php-7.2.7.tar.bz2) = ba76b61f709eda603bf6c6b2d31baf6111210e13
SHA512 (php-7.2.7.tar.bz2) = 7817e082963a4f185c5dd4a7bdd9358e25ae1dc83fa6b353313660c9907a2ead308676be86d5e1f7d586d394308e451dd8139a7879a68ab5d0c4a59fcbe73027
Size (php-7.2.7.tar.bz2) = 15050410 bytes
SHA1 (patch-configure) = 47f2ede97390cc7e46d04c2769dd97459b19450a
+SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c
SHA1 (patch-ext_gd_config.m4) = 67730ccc13410adaf8829f77a6b044f16e412489
SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426
SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8
diff -r 927c615f8be7 -r dd8dcaef2df9 lang/php72/patches/patch-disable-filter-url
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php72/patches/patch-disable-filter-url Wed Jul 18 07:33:12 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-disable-filter-url,v 1.1 2018/07/18 07:33:12 manu Exp $
+
+Add build-time disable option for dangerous php://filter URL
+
Home |
Main Index |
Thread Index |
Old Index