These were found because Tyler has error_reporting set to E_ALL.
To all developers: *please TURN E_ALL ON* to prevent these!
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4124
7612ce4b-ef26-0410-bec9-
ea0150e637f0
/* Read in the preferences. */
$highlight_num = 0;
while (! feof($file)) {
- $pref = trim(fgets($file, 1024));
+ // Make sure that this fgets is larger than any of the pref strings
+ // could ever be. 1024 is too short
+ $pref = trim(fgets($file, 65536));
$equalsAt = strpos($pref, '=');
if ($equalsAt > 0) {
$key = substr($pref, 0, $equalsAt);
* AAAAH! Make my eyes stop bleeding!
* Who wrote this?!
*/
- if (sizeof($message_highlight_list)){
+ if (is_array($message_highlight_list) && count($message_highlight_list)){
foreach ($message_highlight_list as $message_highlight_list_part) {
if (trim($message_highlight_list_part['value']) != '') {
$high_val = strtolower($message_highlight_list_part['value']);
$message_highlight_list[$i]['color'] = $highlight_array[1];
$message_highlight_list[$i]['value'] = $highlight_array[2];
$message_highlight_list[$i]['match_type'] = $highlight_array[3];
- removePref($data_dir, $user_name, "highlight$i");
+ removePref($data_dir, $username, "highlight$i");
}
/* store in new format for the next time */
setPref($data_dir, $username, 'hililist', serialize($message_highlight_list));
$i = 0;
while ($i < count($array))
{
- abook_take_read_string($array[$i]);
+ abook_take_read_string($array[$i]->getAddress());
$i ++;
}
}
html_tag( 'tr' ) .
html_tag( 'td' );
- abook_take_read_string($message->header->from);
- abook_take_read_array($message->header->cc);
- abook_take_read_array($message->header->reply_to);
- abook_take_read_array($message->header->to);
+ if (isset($message->rfc822_header->from))
+ abook_take_read_array($message->rfc822_header->from);
+ if (isset($message->rfc822_header->cc))
+ abook_take_read_array($message->rfc822_header->cc);
+ if (isset($message->rfc822_header->reply_to))
+ abook_take_read_array($message->rfc822_header->reply_to);
+ if (isset($message->rfc822_header->to))
+ abook_take_read_array($message->rfc822_header->to);
$new_body = $body;
global $PHP_SELF, $Darkness_Transition;
if (substr($PHP_SELF, -18) == '/src/left_main.php') {
- echo '<meta http-equiv='Page-Enter' content='' .
- 'blendTrans(Duration=2.0)'>' . '\n';
+ echo '<meta http-equiv="Page-Enter" content="' .
+ 'blendTrans(Duration=2.0)">' . '\n';
}
?><script language=javascript>