Date: Sat, 5 Mar 2022 15:06:00 -0700 (MST) From: Dale Scott <dalescott@shaw.ca> To: Mario Lobo <lobo@bsd.com.br> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian) Message-ID: <599882921.762148.1646517960127.JavaMail.zimbra@shaw.ca> In-Reply-To: <CA%2ByoEx-PMZVae3_s7K0hd10Y1-myT3v%2BKNWuD=jQP7abpRBTNA@mail.gmail.com> References: <CAFuo_fzwWoideFk7AEt3JJephZAFfn0Ty_h==H7AUTfoNFe_nA@mail.gmail.com> <a571119b-d7d5-4f56-800a-019230095b42@email.android.com> <CA%2ByoEx-PMZVae3_s7K0hd10Y1-myT3v%2BKNWuD=jQP7abpRBTNA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> From: "Mario Lobo" <lobo@bsd.com.br>
> To: "Dale Scott (dalescott@shaw)" <dalescott@shaw.ca>
> Cc: "freebsd-questions" <freebsd-questions@freebsd.org>
> Sent: Saturday, March 5, 2022 12:40:16 PM
> Subject: Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff
> FreeBSD vs Debian)
> On Sat, Mar 5, 2022, 01:33 Dale Scott < [ mailto:dalescott@shaw.ca |
> dalescott@shaw.ca ] > wrote:
>> On Mar 1, 2022 6:21 PM, Waitman Gobble < [ mailto:gobble.wa@gmail.com |
>> gobble.wa@gmail.com ] > wrote:
>>> OK. The latest release they have on their site is 8.x something but
>>> there's no mention of it on their git repository, I wonder if they
>>> haven't yet released 8.x for PHP 8 to "community".
>> Good news. The error had nothing to do with FreeBSD and I had a patch the next
>> day. It was nice to see the community response. Thanks again for your help
>> Waitman. Cheers, Dale
> Hi Dale.
> Could you please post the patch, or a link to it?
Sure. Sorry for my oversight.
The patch replaces line 267 in download.php and line 269 modules/Documents/Document.php, in both SuiteCRM-7.12.4 and . In SuiteCRM-8.0.3 (in SuiteCRM-8.0.3 the files are identical but have been moved to .../legacy/.... directory).
E.g. in download.php, replace:
if (in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) {
with:
if (isset($row['file_ext'], $sugar_config['allowed_preview']) && in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) {
Link to topic in the SuiteCRM forum with reply from project maintainer Matt with patch: [ https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177 | https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177 ]
Link to issue reported to SuiteCRM GitHub repo: [ https://github.com/salesagility/SuiteCRM/issues/9530 | https://github.com/salesagility/SuiteCRM/issues/9530 ]
Cheers,
Dale
[-- Attachment #2 --]
<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000000"><div data-marker="__SIG_PRE__"><div><div style="font-size:13.3333px"></div></div></div><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>From: </b>"Mario Lobo" <lobo@bsd.com.br></span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>To: </b>"Dale Scott (dalescott@shaw)" <dalescott@shaw.ca></span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>Cc: </b>"freebsd-questions" <freebsd-questions@freebsd.org></span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>Sent: </b>Saturday, March 5, 2022 12:40:16 PM</span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><b>Subject: </b>Re: file upload issues with SuiteCRM V7/8 (or apache24 and php8 diff FreeBSD vs Debian)</span><br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">On Sat, Mar 5, 2022, 01:33 Dale Scott <<a href="mailto:dalescott@shaw.ca" target="_blank" rel="nofollow noopener noreferrer">dalescott@shaw.ca</a>> wrote:</span><br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">On Mar 1, 2022 6:21 PM, Waitman Gobble <<a href="mailto:gobble.wa@gmail.com" rel="noreferrer nofollow noopener noreferrer" target="_blank">gobble.wa@gmail.com</a>> wrote:</span><br></div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">OK. The latest release they have on their site is 8.x something but
</span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">
there's no mention of it on their git repository, I wonder if they
</span><br><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">
haven't yet released 8.x for PHP 8 to "community".</span><br></p></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Good news. The error had nothing to do with FreeBSD and I had a patch the next day. It was nice to see the community response. Thanks again for your help Waitman. Cheers, Dale</span></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Hi Dale.</span></div><div dir="auto"><br></div><div dir="auto"><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Could you please post the patch, or a link to it?</span></div></div></blockquote><div><br></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Sure. Sorry for my oversight.</span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">The patch replaces <span style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">line 267 in download.php and line 269 modules/Documents/Document.php, in both SuiteCRM-7.12.4 and . In SuiteCRM-8.0.3 (in SuiteCRM-8.0.3 the files are identical but have been moved to .../legacy/.... directory).</span></span></div><div><span style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;"><br data-mce-bogus="1"></span></div><div><span style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">E.g. in download.php, replace:</span></div><div><span style="font-size: 12pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"><br data-mce-bogus="1"></span></div><div><span style="font-size: 12pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 12pt; font-family: arial, helvetica, sans-serif;">if (in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) {</span><br></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">with:</span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">if (isset($row['file_ext'], $sugar_config['allowed_preview']) && in_array($row['file_ext'], $sugar_config['allowed_preview'], true)) {</span><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br data-mce-bogus="1"></span></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Link to topic in the SuiteCRM forum with reply from project maintainer Matt with patch: <a href="https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177">https://community.suitecrm.com/t/php-fatal-error-after-file-upload-on-v7-and-v8-solved/84177</a></span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Link to issue reported to SuiteCRM GitHub repo: <a href="https://github.com/salesagility/SuiteCRM/issues/9530">https://github.com/salesagility/SuiteCRM/issues/9530</a></span></div><div><br data-mce-bogus="1"></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Cheers,</span></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" data-mce-style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">Dale</span></div><div><br data-mce-bogus="1"></div></div></div></body></html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?599882921.762148.1646517960127.JavaMail.zimbra>
