From owner-svn-ports-all@freebsd.org Thu Nov 22 11:53:57 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06E791146277; Thu, 22 Nov 2018 11:53:57 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F63473452; Thu, 22 Nov 2018 11:53:56 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8024A78C8; Thu, 22 Nov 2018 11:53:56 +0000 (UTC) (envelope-from joneum@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAMBruvk035800; Thu, 22 Nov 2018 11:53:56 GMT (envelope-from joneum@FreeBSD.org) Received: (from joneum@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAMBrsBA035789; Thu, 22 Nov 2018 11:53:54 GMT (envelope-from joneum@FreeBSD.org) Message-Id: <201811221153.wAMBrsBA035789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joneum set sender to joneum@FreeBSD.org using -f From: Jochen Neumeister Date: Thu, 22 Nov 2018 11:53:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485597 - in head/mail: php70-imap php70-imap/files php71-imap php71-imap/files php72-imap php72-imap/files php73-imap php73-imap/files X-SVN-Group: ports-head X-SVN-Commit-Author: joneum X-SVN-Commit-Paths: in head/mail: php70-imap php70-imap/files php71-imap php71-imap/files php72-imap php72-imap/files php73-imap php73-imap/files X-SVN-Commit-Revision: 485597 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9F63473452 X-Spamd-Result: default: False [1.35 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.38)[0.377,0]; NEURAL_SPAM_MEDIUM(0.54)[0.538,0]; NEURAL_SPAM_LONG(0.44)[0.439,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 11:53:57 -0000 Author: joneum Date: Thu Nov 22 11:53:53 2018 New Revision: 485597 URL: https://svnweb.freebsd.org/changeset/ports/485597 Log: Disable rsh/ssh functionality in imap by default (php bug #77153). PR: 233384 Submitted by: joneum Approved by: tz (implicit) MFH: 2018Q4 Security: ec49f6b5-ee39-11e8-b2f4-74d435b63d51 Sponsored by: Netzkommune GmbH Added: head/mail/php70-imap/files/patch-php__imap.c (contents, props changed) head/mail/php70-imap/files/patch-php__imap.h (contents, props changed) head/mail/php71-imap/files/patch-php__imap.c (contents, props changed) head/mail/php71-imap/files/patch-php__imap.h (contents, props changed) head/mail/php72-imap/files/patch-php__imap.c (contents, props changed) head/mail/php72-imap/files/patch-php__imap.h (contents, props changed) head/mail/php73-imap/files/patch-php__imap.c (contents, props changed) head/mail/php73-imap/files/patch-php__imap.h (contents, props changed) Modified: head/mail/php70-imap/Makefile head/mail/php71-imap/Makefile head/mail/php72-imap/Makefile head/mail/php73-imap/Makefile Modified: head/mail/php70-imap/Makefile ============================================================================== --- head/mail/php70-imap/Makefile Thu Nov 22 11:47:57 2018 (r485596) +++ head/mail/php70-imap/Makefile Thu Nov 22 11:53:53 2018 (r485597) @@ -2,6 +2,7 @@ # $FreeBSD$ CATEGORIES= mail +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../../lang/php70 Added: head/mail/php70-imap/files/patch-php__imap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php70-imap/files/patch-php__imap.c Thu Nov 22 11:53:53 2018 (r485597) @@ -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; + } Added: head/mail/php70-imap/files/patch-php__imap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php70-imap/files/patch-php__imap.h Thu Nov 22 11:53:53 2018 (r485597) @@ -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: head/mail/php71-imap/Makefile ============================================================================== --- head/mail/php71-imap/Makefile Thu Nov 22 11:47:57 2018 (r485596) +++ head/mail/php71-imap/Makefile Thu Nov 22 11:53:53 2018 (r485597) @@ -1,6 +1,7 @@ # $FreeBSD$ CATEGORIES= mail +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../../lang/php71 Added: head/mail/php71-imap/files/patch-php__imap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php71-imap/files/patch-php__imap.c Thu Nov 22 11:53:53 2018 (r485597) @@ -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; + } Added: head/mail/php71-imap/files/patch-php__imap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php71-imap/files/patch-php__imap.h Thu Nov 22 11:53:53 2018 (r485597) @@ -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: head/mail/php72-imap/Makefile ============================================================================== --- head/mail/php72-imap/Makefile Thu Nov 22 11:47:57 2018 (r485596) +++ head/mail/php72-imap/Makefile Thu Nov 22 11:53:53 2018 (r485597) @@ -1,6 +1,7 @@ # $FreeBSD$ CATEGORIES= mail +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../../lang/php72 Added: head/mail/php72-imap/files/patch-php__imap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php72-imap/files/patch-php__imap.c Thu Nov 22 11:53:53 2018 (r485597) @@ -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; + } Added: head/mail/php72-imap/files/patch-php__imap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php72-imap/files/patch-php__imap.h Thu Nov 22 11:53:53 2018 (r485597) @@ -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: head/mail/php73-imap/Makefile ============================================================================== --- head/mail/php73-imap/Makefile Thu Nov 22 11:47:57 2018 (r485596) +++ head/mail/php73-imap/Makefile Thu Nov 22 11:53:53 2018 (r485597) @@ -1,6 +1,7 @@ # $FreeBSD$ CATEGORIES= mail +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../../lang/php73 Added: head/mail/php73-imap/files/patch-php__imap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php73-imap/files/patch-php__imap.c Thu Nov 22 11:53:53 2018 (r485597) @@ -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; + } Added: head/mail/php73-imap/files/patch-php__imap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/php73-imap/files/patch-php__imap.h Thu Nov 22 11:53:53 2018 (r485597) @@ -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