svn commit: r485608 - in branches/2018Q4/mail: php70-imap php70-imap/files php71-imap php71-imap/files php72-imap php72-imap/files
Antoine Brodin
antoine at FreeBSD.org
Thu Nov 22 19:00:07 UTC 2018
Author: antoine
Date: Thu Nov 22 19:00:04 2018
New Revision: 485608
URL: https://svnweb.freebsd.org/changeset/ports/485608
Log:
MFH: r485597
Disable rsh/ssh functionality in imap by default (php bug #77153).
PR: 233384
Submitted by: joneum
Approved by: tz (implicit)
Security: ec49f6b5-ee39-11e8-b2f4-74d435b63d51
Sponsored by: Netzkommune GmbH
Added:
branches/2018Q4/mail/php70-imap/files/patch-php__imap.c
- copied unchanged from r485597, head/mail/php70-imap/files/patch-php__imap.c
branches/2018Q4/mail/php70-imap/files/patch-php__imap.h
- copied unchanged from r485597, head/mail/php70-imap/files/patch-php__imap.h
branches/2018Q4/mail/php71-imap/files/patch-php__imap.c
- copied unchanged from r485597, head/mail/php71-imap/files/patch-php__imap.c
branches/2018Q4/mail/php71-imap/files/patch-php__imap.h
- copied unchanged from r485597, head/mail/php71-imap/files/patch-php__imap.h
branches/2018Q4/mail/php72-imap/files/patch-php__imap.c
- copied unchanged from r485597, head/mail/php72-imap/files/patch-php__imap.c
branches/2018Q4/mail/php72-imap/files/patch-php__imap.h
- copied unchanged from r485597, head/mail/php72-imap/files/patch-php__imap.h
Modified:
branches/2018Q4/mail/php70-imap/Makefile
branches/2018Q4/mail/php71-imap/Makefile
branches/2018Q4/mail/php72-imap/Makefile
Modified: branches/2018Q4/mail/php70-imap/Makefile
==============================================================================
--- branches/2018Q4/mail/php70-imap/Makefile Thu Nov 22 18:30:10 2018 (r485607)
+++ branches/2018Q4/mail/php70-imap/Makefile Thu Nov 22 19:00:04 2018 (r485608)
@@ -2,6 +2,7 @@
# $FreeBSD$
CATEGORIES= mail
+PORTREVISION= 1
MASTERDIR= ${.CURDIR}/../../lang/php70
Copied: branches/2018Q4/mail/php70-imap/files/patch-php__imap.c (from r485597, head/mail/php70-imap/files/patch-php__imap.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php70-imap/files/patch-php__imap.c Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php70-imap/files/patch-php__imap.c)
@@ -0,0 +1,40 @@
+--- php_imap.c.orig 2018-09-11 22:12:36 UTC
++++ php_imap.c
+@@ -562,6 +562,15 @@ static const zend_module_dep imap_deps[]
+ };
+ /* }}} */
+
++
++/* {{{ PHP_INI
++ */
++PHP_INI_BEGIN()
++STD_PHP_INI_BOOLEAN("imap.enable_insecure_rsh", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_rsh, zend_imap_globals, imap_globals)
++PHP_INI_END()
++/* }}} */
++
++
+ /* {{{ imap_module_entry
+ */
+ zend_module_entry imap_module_entry = {
+@@ -835,6 +844,8 @@ PHP_MINIT_FUNCTION(imap)
+ {
+ unsigned long sa_all = SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY;
+
++ REGISTER_INI_ENTRIES();
++
+ #ifndef PHP_WIN32
+ mail_link(&unixdriver); /* link in the unix driver */
+ mail_link(&mhdriver); /* link in the mh driver */
+@@ -1052,6 +1063,12 @@ PHP_MINIT_FUNCTION(imap)
+ GC_TEXTS texts
+ */
+
++ if (!IMAPG(enable_rsh)) {
++ /* disable SSH and RSH, see https://bugs.php.net/bug.php?id=77153 */
++ mail_parameters (NIL, SET_RSHTIMEOUT, 0);
++ mail_parameters (NIL, SET_SSHTIMEOUT, 0);
++ }
++
+ le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, "imap", module_number);
+ return SUCCESS;
+ }
Copied: branches/2018Q4/mail/php70-imap/files/patch-php__imap.h (from r485597, head/mail/php70-imap/files/patch-php__imap.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php70-imap/files/patch-php__imap.h Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php70-imap/files/patch-php__imap.h)
@@ -0,0 +1,10 @@
+--- php_imap.h.orig 2018-09-11 22:12:36 UTC
++++ php_imap.h
+@@ -214,6 +214,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap)
+ #endif
+ /* php_stream for php_mail_gets() */
+ php_stream *gets_stream;
++ zend_bool enable_rsh;
+ ZEND_END_MODULE_GLOBALS(imap)
+
+ #ifdef ZTS
Modified: branches/2018Q4/mail/php71-imap/Makefile
==============================================================================
--- branches/2018Q4/mail/php71-imap/Makefile Thu Nov 22 18:30:10 2018 (r485607)
+++ branches/2018Q4/mail/php71-imap/Makefile Thu Nov 22 19:00:04 2018 (r485608)
@@ -1,6 +1,7 @@
# $FreeBSD$
CATEGORIES= mail
+PORTREVISION= 1
MASTERDIR= ${.CURDIR}/../../lang/php71
Copied: branches/2018Q4/mail/php71-imap/files/patch-php__imap.c (from r485597, head/mail/php71-imap/files/patch-php__imap.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php71-imap/files/patch-php__imap.c Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php71-imap/files/patch-php__imap.c)
@@ -0,0 +1,40 @@
+--- php_imap.c.orig 2018-09-11 22:12:36 UTC
++++ php_imap.c
+@@ -562,6 +562,15 @@ static const zend_module_dep imap_deps[]
+ };
+ /* }}} */
+
++
++/* {{{ PHP_INI
++ */
++PHP_INI_BEGIN()
++STD_PHP_INI_BOOLEAN("imap.enable_insecure_rsh", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_rsh, zend_imap_globals, imap_globals)
++PHP_INI_END()
++/* }}} */
++
++
+ /* {{{ imap_module_entry
+ */
+ zend_module_entry imap_module_entry = {
+@@ -835,6 +844,8 @@ PHP_MINIT_FUNCTION(imap)
+ {
+ unsigned long sa_all = SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY;
+
++ REGISTER_INI_ENTRIES();
++
+ #ifndef PHP_WIN32
+ mail_link(&unixdriver); /* link in the unix driver */
+ mail_link(&mhdriver); /* link in the mh driver */
+@@ -1052,6 +1063,12 @@ PHP_MINIT_FUNCTION(imap)
+ GC_TEXTS texts
+ */
+
++ if (!IMAPG(enable_rsh)) {
++ /* disable SSH and RSH, see https://bugs.php.net/bug.php?id=77153 */
++ mail_parameters (NIL, SET_RSHTIMEOUT, 0);
++ mail_parameters (NIL, SET_SSHTIMEOUT, 0);
++ }
++
+ le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, "imap", module_number);
+ return SUCCESS;
+ }
Copied: branches/2018Q4/mail/php71-imap/files/patch-php__imap.h (from r485597, head/mail/php71-imap/files/patch-php__imap.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php71-imap/files/patch-php__imap.h Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php71-imap/files/patch-php__imap.h)
@@ -0,0 +1,10 @@
+--- php_imap.h.orig 2018-09-11 22:12:36 UTC
++++ php_imap.h
+@@ -214,6 +214,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap)
+ #endif
+ /* php_stream for php_mail_gets() */
+ php_stream *gets_stream;
++ zend_bool enable_rsh;
+ ZEND_END_MODULE_GLOBALS(imap)
+
+ #ifdef ZTS
Modified: branches/2018Q4/mail/php72-imap/Makefile
==============================================================================
--- branches/2018Q4/mail/php72-imap/Makefile Thu Nov 22 18:30:10 2018 (r485607)
+++ branches/2018Q4/mail/php72-imap/Makefile Thu Nov 22 19:00:04 2018 (r485608)
@@ -1,6 +1,7 @@
# $FreeBSD$
CATEGORIES= mail
+PORTREVISION= 1
MASTERDIR= ${.CURDIR}/../../lang/php72
Copied: branches/2018Q4/mail/php72-imap/files/patch-php__imap.c (from r485597, head/mail/php72-imap/files/patch-php__imap.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php72-imap/files/patch-php__imap.c Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php72-imap/files/patch-php__imap.c)
@@ -0,0 +1,40 @@
+--- php_imap.c.orig 2018-09-11 22:12:36 UTC
++++ php_imap.c
+@@ -562,6 +562,15 @@ static const zend_module_dep imap_deps[]
+ };
+ /* }}} */
+
++
++/* {{{ PHP_INI
++ */
++PHP_INI_BEGIN()
++STD_PHP_INI_BOOLEAN("imap.enable_insecure_rsh", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_rsh, zend_imap_globals, imap_globals)
++PHP_INI_END()
++/* }}} */
++
++
+ /* {{{ imap_module_entry
+ */
+ zend_module_entry imap_module_entry = {
+@@ -835,6 +844,8 @@ PHP_MINIT_FUNCTION(imap)
+ {
+ unsigned long sa_all = SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY;
+
++ REGISTER_INI_ENTRIES();
++
+ #ifndef PHP_WIN32
+ mail_link(&unixdriver); /* link in the unix driver */
+ mail_link(&mhdriver); /* link in the mh driver */
+@@ -1052,6 +1063,12 @@ PHP_MINIT_FUNCTION(imap)
+ GC_TEXTS texts
+ */
+
++ if (!IMAPG(enable_rsh)) {
++ /* disable SSH and RSH, see https://bugs.php.net/bug.php?id=77153 */
++ mail_parameters (NIL, SET_RSHTIMEOUT, 0);
++ mail_parameters (NIL, SET_SSHTIMEOUT, 0);
++ }
++
+ le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, "imap", module_number);
+ return SUCCESS;
+ }
Copied: branches/2018Q4/mail/php72-imap/files/patch-php__imap.h (from r485597, head/mail/php72-imap/files/patch-php__imap.h)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q4/mail/php72-imap/files/patch-php__imap.h Thu Nov 22 19:00:04 2018 (r485608, copy of r485597, head/mail/php72-imap/files/patch-php__imap.h)
@@ -0,0 +1,10 @@
+--- php_imap.h.orig 2018-09-11 22:12:36 UTC
++++ php_imap.h
+@@ -214,6 +214,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap)
+ #endif
+ /* php_stream for php_mail_gets() */
+ php_stream *gets_stream;
++ zend_bool enable_rsh;
+ ZEND_END_MODULE_GLOBALS(imap)
+
+ #ifdef ZTS
More information about the svn-ports-branches
mailing list