commit 8b7789232b480a894da66ec9fdab4817b5c5e513 Author: Jan Palus <at...@pld-linux.org> Date: Thu Jan 23 01:06:59 2025 +0100
drop mail patch (broken since 7.2.0) ref: https://github.com/php/php-src/commit/6e53050 php-mail.patch | 75 ---------------------------------------------------------- php.spec | 2 -- 2 files changed, 77 deletions(-) --- diff --git a/php.spec b/php.spec index 10acd88..5d03b66 100644 --- a/php.spec +++ b/php.spec @@ -176,7 +176,6 @@ Source13: dep-tests.sh Source14: skip-tests.sh Patch0: %{orgname}-shared.patch Patch1: %{orgname}-pldlogo.patch -Patch2: %{orgname}-mail.patch Patch3: %{orgname}-link-libs.patch Patch4: intl-stdc++.patch Patch5: %{orgname}-filter-shared.patch @@ -1998,7 +1997,6 @@ Moduł PHP umożliwiający używanie kompresji zlib. cp -p php.ini-production php.ini %patch -P0 -p1 %patch -P1 -p1 -%patch -P2 -p1 %patch -P3 -p1 %patch -P4 -p1 %patch -P5 -p1 diff --git a/php-mail.patch b/php-mail.patch deleted file mode 100644 index 5b2adf0..0000000 --- a/php-mail.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- php-7.1.22.org/ext/standard/mail.c 2018-09-11 16:08:35.000000000 +0200 -+++ php-7.1.22/ext/standard/mail.c 2018-09-14 11:40:47.086119608 +0200 -@@ -46,6 +46,8 @@ - #include "php_ini.h" - #include "php_string.h" - #include "exec.h" -+#include "zend_operators.h" -+#include "zend_globals.h" - - #ifdef PHP_WIN32 - #include "win32/sendmail.h" -@@ -125,6 +127,18 @@ PHP_FUNCTION(mail) - MAIL_ASCIIZ_CHECK(ZSTR_VAL(extra_cmd), ZSTR_LEN(extra_cmd)); - } - -+ /* search for To: and Subject: headers which should be specified in proper mail() parameters, not in additional headers */ -+ if (headers != NULL) { -+ if (strncasecmp(headers, "to:", sizeof("to:") - 1) == 0 || strcasestr(headers, "\nto:")) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "To: headers aren't allowed in the additional_headers parameter. Use $to parameter for that. Mail not sent."); -+ RETURN_FALSE; -+ } -+ if (strncasecmp(headers, "subject:", sizeof("subject:") - 1) == 0 || strcasestr(headers, "\nsubject:")) { -+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject: headers aren't allowed in the additional_headers parameter. Use $subject parameter for that. Mail not sent."); -+ RETURN_FALSE; -+ } -+ } -+ - if (to_len > 0) { - to_r = estrndup(to, to_len); - for (; to_len; to_len--) { -@@ -397,8 +411,42 @@ PHPAPI int php_mail(char *to, char *subj - MAIL_RET(0); - } - #endif -- fprintf(sendmail, "To: %s\n", to); -- fprintf(sendmail, "Subject: %s\n", subject); -+ TSRMLS_FETCH(); -+ -+ if ((to != NULL) && (strlen(to)!=0)) { -+ fprintf(sendmail, "To: %s\n", to); -+ } -+ if ((subject != NULL) && (strlen(subject)!=0)) { -+ fprintf(sendmail, "Subject: %s\n", subject); -+ } -+ if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY -+ || zend_is_auto_global_str(ZEND_STRL("_SERVER"))) { -+ zval *remote_addr, *server_name, *server_port, *script_name, *http_user_agent; -+ remote_addr = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), -+ "REMOTE_ADDR", sizeof("REMOTE_ADDR")-1); -+ server_name = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), -+ "SERVER_NAME", sizeof("SERVER_NAME")-1); -+ server_port = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), -+ "SERVER_PORT", sizeof("SERVER_PORT")-1); -+ script_name = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), -+ "SCRIPT_NAME", sizeof("SCRIPT_NAME")-1); -+ http_user_agent = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), -+ "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT")-1); -+ -+ if (remote_addr && Z_TYPE_P(remote_addr) == IS_STRING) -+ fprintf(sendmail, "HTTP-Posting-Client: %s\n", Z_STRVAL_P(remote_addr)); -+ if (server_name && Z_TYPE_P(server_name) == IS_STRING) { -+ fprintf(sendmail, "HTTP-Posting-URI: %s", Z_STRVAL_P(server_name)); -+ if (server_port && Z_TYPE_P(server_port) == IS_STRING) -+ fprintf(sendmail, ":%s", Z_STRVAL_P(server_port)); -+ if (script_name && Z_TYPE_P(script_name) == IS_STRING) -+ fprintf(sendmail, "%s", Z_STRVAL_P(script_name)); -+ fprintf(sendmail, "\n"); -+ } -+ if (http_user_agent && Z_TYPE_P(http_user_agent) == IS_STRING) -+ fprintf(sendmail, "HTTP-Posting-User-Agent: %s\n", Z_STRVAL_P(http_user_agent)); -+ } -+ - if (hdr != NULL) { - fprintf(sendmail, "%s\n", hdr); - } ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/40561f932b20c09b35d1ed680964935aa11ab36f _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit