Bug 229454
Summary: | Errors in /var/log/httpd/error_log | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nigel Horne <njh> |
Component: | squirrelmail | Assignee: | Martin Bacovsky <mbacovsk> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | bugs-redhat, hyde, tokul, wtogami |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-04-24 12:22:00 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nigel Horne
2007-02-21 09:01:59 UTC
Error comes from squirrelmail-1.4.8-IE-Japanese-download-ugly-hack.patch --- + if (!$charset_converted) { + if ($charset == 'iso-2022-jp' || $charset == 'shift_jis' || $charset == 'euc-jp' || + ($squirrelmail_language == 'ja_JP' && + ($charset == 'utf-8' || $charset == '' || $charset == 'us-ascii'))) { + $body = $languages['ja_JP']['XTRA_CODE']('decode', $body); + $charset_converted = true; + } + } --- $charset_converted variable is not initialized. You need '$charset_converted = false;' before 'if (!$charset_converted) {' --- + $charset_converted = false; + if (charset == 'iso-2022-jp' || $charset == 'shift_jis' || $charset == 'euc-$jp' || + ($squirrelmail_language == 'ja_JP' && + ($charset == 'utf-8' || $charset == '' || $charset == 'us-ascii'))) { + $body = $languages['ja_JP']['XTRA_CODE']('decode', $body); + $charset_converted = true; + } --- $charset variable is not set and all $charset = 'some-charset' tests are questionable. ($charset == 'iso-2022-jp' - always false || $charset == 'shift_jis' - always false || $charset == 'euc-jp' - always false || ($squirrelmail_language == 'ja_JP' && - true in Japanese translation ($charset == 'utf-8' || $charset == '' || $charset == 'us-ascii') - always true )) Is there some Fedora bug report proving that correctly formated mime messages need more than $charset_converted and Japanese translation test? If patch wanted to test $default_charset var, then it still does not explain why Japanese extra code is applied to US English translation. --- + $charset_converted = false; + if ($squirrelmail_language == 'ja_JP') { + $body = $languages['ja_JP']['XTRA_CODE']('decode', $body); + $charset_converted = true; + } --- Please note that SquirrelMail guidelines require coding in PHP error_reporting= E_ALL, display_errors=on and register_globals=off environment. Fedora patches should be tested in such PHP setups. First two settings allow to catch programming mistakes, third setting eliminates use of unchecked globals. If you use SquirrelMail 1.4.7 or later, register_globals = on setups might behave differently only when SquirrelMail core functions are not loaded or they are loaded in incorrect order. *** This bug has been marked as a duplicate of 235560 *** This issue was fixed in RAWHIDE, but patch cuasing it looks somehow wierd. It will need some more investigation. Fianlly I removed parts modifying formatBody function from the ugly-hack patch. Error messages no longer appear in log so I regard this issue as fixed. Feel free to reopen this bug if errors reappear. Fixed version is squirrelmail-1.4.9a-2.fc7 in RAWHIDE. *** Bug 204211 has been marked as a duplicate of this bug. *** |