From nobody Tue May 03 10:14:45 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3678B1AA845C; Tue, 3 May 2022 10:14:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kswn16ty0z4d58; Tue, 3 May 2022 10:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651572886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iyJsJy4rhfR7chVyMFzS3JZtFRZIVpRukzpH7OzhmQ=; b=jSavD/JksElWdKJSF0AMIXVToOnF6QcLC1G70mp8Ct/xfz+27pMWBVVsKyEBh6XbIp40mm 5/R8nzwf8PcYZv14CoA16of124latKJFB8cj5nE+ro3wBLuWUWMW3hOCR6w7kM7GliPXHB JXrngmQSDAYHcTNcPEtd7uY+polM4GoRapQR0YZ1fY39WWDJl80h4Xnla9Pb3hcG4srfm3 UxmpYEu3Y0GsssOOQjyRrzTcGxS4kkukkinq6pW7wCbTXu52+esqbUWnnJD0oXbu1Wed8t GkLJ13xVA0Pi64NLd1zhZ/CGrZ5tOCpZBg9E5o2IqBjhHFp7HjRVgzLQTq4Gwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43C411C376; Tue, 3 May 2022 10:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 243AEjMb066799; Tue, 3 May 2022 10:14:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 243AEjBK066798; Tue, 3 May 2022 10:14:45 GMT (envelope-from git) Date: Tue, 3 May 2022 10:14:45 GMT Message-Id: <202205031014.243AEjBK066798@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: f9f524f160cb - main - mail/rainloop: Add patch to fix cross-site-scripting (XSS) vulnerability List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9f524f160cb67555ffab240926b693d090ebd20 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651572886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iyJsJy4rhfR7chVyMFzS3JZtFRZIVpRukzpH7OzhmQ=; b=u6hcHHtyQ012lSZ3V6CV7+lf1sNIWeCJZWA2H8EK41UlPv/pbm+AeKak12Olrrv4cOnmwm E5mjUunRh2PX038i+9wF0UrMPcR8f7wz8VPPHTWz/z/gouPE9DQboqyvGiFv8EdsdriDFb ZBwN7AMVOuO5znpHGuqGRRBLAK9b7vVyhLplxTqd0TeoqzKDR6jId6JAJlcq3vGFni2q7u M3EzetZlylvtbreRwYrbTiL47PwSmcE7dKxSIXdsFBdiI2LMmXV7VnslhAiUdvcp/vys0V B498WUNomc1rvuxeFWqvKfB4WBEsPtzXFNyt5v5w0PXGu5uLZN7nrJSDGsbRGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651572886; a=rsa-sha256; cv=none; b=blfe9eT4mwPe6JVoyU6VVtAKAjUmNcE7Dmu8YazvzrZOOZY567zO6hPy9C0Y2rhf38Cb9V rjRkQsUFz/qZNVz5XRTXVFg+caXpC6LLLo57/zjJyXCSglNTjKfgGrDAJDYDqntmb2Qxyu LN0cFpkgxoL1ZvmS9Esnoz2hcq1kh+BXhQswym2rM5a/4xkBBmkPMKC6R7wxzpSRSJ+bIP eXNaDNaSqDaAHjOfbuPRi/KdYm+lq5AKqIXpCdGz3YSwaDZOYu7IOWIIhqcUDqDarK2V9j BjXj3BYufRFmFW6na9RX/LSaaqX1knLEV4MPTbJ+e9nXOR0wv6qCsy5HZzzd7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9f524f160cb67555ffab240926b693d090ebd20 commit f9f524f160cb67555ffab240926b693d090ebd20 Author: Yasuhiro Kimura AuthorDate: 2022-05-03 10:06:33 +0000 Commit: Yasuhiro Kimura CommitDate: 2022-05-03 10:12:56 +0000 mail/rainloop: Add patch to fix cross-site-scripting (XSS) vulnerability PR: 263749 Reported by: Lapo Luchini Obtained from: https://blog.sonarsource.com/rainloop-emails-at-risk-due-to-code-flaw MFH: 2022Q2 Security: a8118db0-cac2-11ec-9288-0800270512f4 --- mail/rainloop/Makefile | 2 +- ...v_1.16.0_app_libraries_MailSo_Base_HtmlUtils.php | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/mail/rainloop/Makefile b/mail/rainloop/Makefile index 37b9010a9499..1f2dfc496013 100644 --- a/mail/rainloop/Makefile +++ b/mail/rainloop/Makefile @@ -1,6 +1,6 @@ PORTNAME= rainloop DISTVERSION= 1.16.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail www MASTER_SITES= https://github.com/RainLoop/rainloop-webmail/releases/download/v${PORTVERSION}/ PKGNAMESUFFIX?= ${PHP_PKGNAMESUFFIX} diff --git a/mail/rainloop/files/patch-rainloop_v_1.16.0_app_libraries_MailSo_Base_HtmlUtils.php b/mail/rainloop/files/patch-rainloop_v_1.16.0_app_libraries_MailSo_Base_HtmlUtils.php new file mode 100644 index 000000000000..210cee2adc56 --- /dev/null +++ b/mail/rainloop/files/patch-rainloop_v_1.16.0_app_libraries_MailSo_Base_HtmlUtils.php @@ -0,0 +1,21 @@ +--- rainloop/v/1.16.0/app/libraries/MailSo/Base/HtmlUtils.php.orig 2021-05-06 11:04:36 UTC ++++ rainloop/v/1.16.0/app/libraries/MailSo/Base/HtmlUtils.php +@@ -239,7 +239,8 @@ class HtmlUtils + $oWrapHtml->setAttribute($sKey, $sValue); + } + +- $oWrapDom = $oDom->createElement('div', '___xxx___'); ++ $rand_str = base64_encode(random_bytes(32)); ++ $oWrapDom = $oDom->createElement('div', $rand_str); + $oWrapDom->setAttribute('data-x-div-type', 'body'); + foreach ($aBodylAttrs as $sKey => $sValue) + { +@@ -250,7 +251,7 @@ class HtmlUtils + + $sWrp = $oDom->saveHTML($oWrapHtml); + +- $sResult = \str_replace('___xxx___', $sResult, $sWrp); ++ $sResult = \str_replace($rand_str, $sResult, $sWrp); + } + + $sResult = \str_replace(\MailSo\Base\HtmlUtils::$KOS, ':', $sResult);