phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015463phplist applicationInterface - Backendpublic28-04-10 06:1129-04-11 12:45
Reporterh2b2 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version2.10.12 
Target Version2.10.13Fixed in Version2.10.14 
Summary0015463: Call to iconv() doesn't fail gracefully and prevents FCKeditor from loading
DescriptionSeveral users reported that FCKeditor failed to load when opening the 'Send a Message' page. The problematic code was found in send_core.php around line 1032 and includes a call to iconv, which does not seem fail gracefully, and apparently prevents FCKeditor from loading.

The issue occurred on systems that do NOT have the iconv module included in their PHP installation.

A possible solution is to add a fall back method in case iconv isn't detected, though I'm not sure if using iconv in the first place is a very good idea, given that it apparently is a non-standard PHP extension.
Steps To ReproduceSystem details available in this forum thread: http://forums.phplist.com/viewtopic.php?p=74819#p74819 [^]
Additional Informationbpbeinlich found the problematic code section:
==== Start Quote ====
OK, here's the culprit:

This block of code appears in send_core.php beginning at line 1032:

$utf8_subject = $subject;
$utf8_from = $from;
if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
$utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
$utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);
}

The first call to iconv crashes the page. I looked deeper and discovered that these variables ($utf8_subject and $utf_from) are not used anywhere. So this code is apparently not used at all. I commented out the entire block of 6 lines and the page now displays correctly.
==== Start Quote ====
ref: http://forums.phplist.com/viewtopic.php?p=74772#p74772 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0015324resolvedmichiel Subject and From turn to Gibberish when saved not in English 
related to 0015287resolvedmichiel v2.10.10: FCKeditor doesn't load when opening the 'send a message' page. 
related to 0015299resolvedmichiel 'Short' php tag in fckphplist.php causes FCKEditor not to load 
related to 0015215resolvedmichiel Saphari (on MAC) -part of user interface not displayed when creating a new message 
related to 0011755resolvedmichiel FCKeditor does not appear in the message or template editor windows 
has duplicate 0015350resolvedmichiel "Send Message" screen is incomplete 
has duplicate 0015596resolvedmichiel Can't Send Message FCK Editor Not Loaded 
related to 0015545resolvedmichiel Call to iconv() doesn't fail gracefully 

-  Notes
(0050973)
h2b2 (manager)
28-04-10 07:42
edited on: 28-04-10 07:46

bpbeinlich' observation that the $utf8_subject and $utf8_from variables aren't used seems to be correct. Assuming they were to be used in the code changes suggested by lwc in issue 15324, then the changes seem to be incomplete and would probably need to look like this:

  $scheduling_content = '<table>';
// custom code - start
  $utf8_subject = $subject;
  $utf8_from = $from;
  if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
     $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
     $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);
  }

  $maincontent .= '
  <tr><td>'.Help("subject").' '.$GLOBALS['I18N']->get("Subject").':</td>
    <td><input type=text name="msgsubject"
    value="'.htmlentities($utf8_subject,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
  <tr>
    <td colspan=2>
    </td></tr>
  <tr><td>'.Help("from").' '.$GLOBALS['I18N']->get("fromline").':</td>
    <td><input type=text name=from
    value="'.htmlentities($utf8_from,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
  <tr><td colspan=2>

  </td></tr>';
// custom code - end

See: http://mantis.phplist.com/view.php?id=15324 [^]

A fall back method would still need to be added for systems that do not have the iconv extension, if you decide keep using iconv.

(0051196)
michiel (manager)
29-04-11 12:45

http://phplist.svn.sourceforge.net/phplist/?rev=2662&view=rev [^]


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker