Tracker: Bugs

5 Can not attach files - ID: 1805471
Last Update: Comment added ( korlid )

Since upgrading to 1.4.11 I can't attach a file when composing a message. I
can attach a file but when I send the message no attachment is sent with
the mail. Also while in the compose window, I can attach one file, then
attach a second file and the first file simply disappears. I have a heavily
patches squirrelmail rpm but tried a vanilla install of 1.4.11 with the
same result. My system is RHEL4 with php-4.3.9.


Simon Matter ( simix ) - 2007-10-01 08:22

5

Closed

Fixed

Jonathan Angliss

Compose

None

Public


Comments ( 23 )

Date: 2007-12-12 09:58
Sender: korlid


{1805471 ] Can not attach files


Date: 2007-11-28 02:34
Sender: janglissProject AdminAccepting Donations


The above mentioned bug is related to a code change between 1.4.10, and
1.4.11. You should submit your bug with the SquirrelOutlook project, as
they may have made modifications to the code that we don't support.


Date: 2007-11-27 22:43
Sender: dpjones4ic


I believe I have a related question. Please let me know if I'm not
following protocol. I am using squirreloutlook-1.0.3, a variant which
seems to be using SquirrelMail version: 1.4.8 as it's base.
I am seeing the exact kind of behavior as mentioned below (only one
attachment can be added and it doesn't send). I found that this only seems
to happen when using the HTML composer. With plain view, attachments
work.

What do you recommend to fix this? I am running this on OpenSuSE 10.2 with
PHP 5.2

Thanks in advance.



Date: 2007-11-12 02:58
Sender: janglissProject AdminAccepting Donations


Weird, did you apply it after you applied the first patch? How about just
grabbing a copy of the SVN snapshot from the download page?


Date: 2007-11-10 22:04
Sender: theexterminator


the second patch, the file i add, can you not see after you add it, and
there are no file with the mail


Date: 2007-11-10 22:01
Sender: janglissProject AdminAccepting Donations


What's wrong with the second patch? The second patch also includes a fix
for an additional attachments issue that my original patch doesn't handle.
I'd recommend grabbing a copy of the 1.4.12-SVN snapshots.


Date: 2007-11-10 21:30
Sender: theexterminator


The 2 pacth willnot work for me, but jangliss chancge in src/compose.php
linje 380 work 100%
if (!empty($attachments)) {
$attachments = unserialize($attachments);
if (!empty($attachments) && is_array($attachments)) {
$composeMessage->entities = $attachments;
$compose_messages[$session] = $composeMessage;
}
}

Thanks alot


Date: 2007-10-07 03:02
Sender: janglissProject AdminAccepting Donations


This bug has been resolved.

Please pull the latest version from the appropriate development
tree CVS to fix your bug.

Thank you for your help in resolving this issue.


Date: 2007-10-04 08:21
Sender: simix


I tried the updated patch 1.4.11_compose_attachments.patch and it seems to
work fine for me, thanks.


Date: 2007-10-03 20:08
Sender: pdontthinkProject AdminAccepting Donations


Attached is a patch I suggest that cleans up the use of compose_messages a
little more completely.
File Added: 1.4.11_compose_attachments.patch


Date: 2007-10-03 07:44
Sender: sajtxl


Thank You, works perfect.


Date: 2007-10-03 07:11
Sender: lcd_47


That's it, the patch seems to fix the problem. Thank you for the quick
response!


Date: 2007-10-03 07:11
Sender: janglissProject AdminAccepting Donations


Download the file to somewhere on the server, then from inside the root of
the SquirrelMail directory (where src, class, etc can be seen), type:

patch -p0 < /path/to/patch/1805471_composeattach.patch

You should then see two lines come back that say it has updated
compose.php, and addrbook_search_html.php.


Date: 2007-10-03 06:59
Sender: sajtxl


Sorry for my bad knowledge, but how can I add this patch?


Date: 2007-10-03 06:46
Sender: janglissProject AdminAccepting Donations


This additional scenario is also broken in PHP 5.x too. Attached is a
patch to fix both issues.
File Added: 1805471_composeattach.patch


Date: 2007-10-03 05:52
Sender: lcd_47


This is indeed an improvement, but it only solves a part of the problem.
Try this scenario:

1. start composing a new message
2. attach a file
3. press the "Addresses" button and choose a "To" field
4. get back to the compose page.

The attachment is still dropped.


Date: 2007-10-03 04:54
Sender: janglissProject AdminAccepting Donations


Around line 380 in src/compose.php, you should see the following code:

if (!empty($attachments)) {
$attachments = unserialize($attachments);
if (!empty($attachments) && is_array($attachments))
$composeMessage->entities = $attachments;
}

Change that code to the following:

if (!empty($attachments)) {
$attachments = unserialize($attachments);
if (!empty($attachments) && is_array($attachments)) {
$composeMessage->entities = $attachments;
$compose_messages[$session] = $composeMessage;
}
}

This seems to have resolve the issue on my PHP 4.4.x setup, and not
impacted my PHP 5.x.x setup.


Date: 2007-10-02 18:32
Sender: sajtxl


Works OK with PHP Version 5.2.4 and mySQL 5.0.45
Works not with PHP Version 4.4.7 and mySQL 4.1.21


Date: 2007-10-02 09:46
Sender: simix


I just tried it on php-5.1.6 and attachments work fine. So it looks like
SM-1.4.11 is broken with PHP 4.x.


Date: 2007-10-02 07:17
Sender: lcd_47


Apache 1.3.37, PHP 4.4.7, Suhosin patch 4.4.7-0.9.6.
register_globals = Off (along with lots of other tweaking to php.ini).

Active plugins:
1. abook_import_export
2. abook_take
3. address_add
4. archive_mail
5. attachment_tnef
6. auto_prune_sent
7. autocomplete
8. block_attach
9. calendar
10. cleanup
11. compose_chars
12. compose_fix
13. delete_move_next
14. empty_trash
15. extract
16. folder_sizes
17. folder_synch
18. get_uuencode
19. image_buttons
20. legend
21. listcommands
22. login_alias
23. mail_fetch
24. message_details
25. newmail
26. preview_pane
27. select_range
28. sent_subfolders
29. msg_flags
30. show_headers
31. show_user_and_ip
32. smallcal
33. squirrel_logger
34. undelete
35. variable_sent_folder
36. view_as_html
37. filters
38. windows
39. change_sqlpass
40. cookie_warning

Versions:
abook_import_export-1.1-1.4.4.tar.gz
address_add-2.1-1.4.0.tar.gz
archive_mail.1.2-1.4.2.tar.gz
attachment_tnef-0.7-1.4.0.tar.gz
autocomplete.2.0-1.0.0.tar.gz
auto_prune_sent-1.1.tar.gz
block_attach.0.7-1.4.5.tar.gz
change_sqlpass-3.3-1.2.tar.gz
cleanup.0.2-1.4.0.tar.gz
compatibility-2.0.4.tar.gz
compose_chars-0.1-1.4.tar.gz
compose_fix.tar.gz
cookie_warning-1.1-1.4.3.tar.gz
empty_trash-1.4-1.2.2.tar.gz
extract.0.1-1.4.0.tar.gz
folder_sizes-1.5-1.4.0.tar.gz
folder_synch.0.8-1.4.0.tar.gz
get_uuencode-3.1-1.4.x.tar.gz
image_buttons-1.4-1.4.tar.gz
legend.1.2-1.2.8.tar.gz
login_alias-2.4-1.2.1.tar.gz
msg_flags-1.4.3.1-1.4.3.tar.gz
newuser_wiz-1.3.2.tar.gz
preview_pane-1.2-1.4.3.tar.gz
select_range-3.5.tar.gz
show_headers-1.3-1.4.tar.gz
show_user_and_ip-3.3-re-1.2.2.tar.gz
smallcal-0.8-1.2.3.tar.gz
squirrel_logger-2.0-1.2.7.tar.gz
undelete.1.0-1.0.tar.gz
variable_sent_folder.0.4-1.4.tar.gz
view_as_html-3.7a-1.4.x.tar.gz
windows-1.6-1.4.tar.gz

More information:
1. Replacing compose.php with the one from 1.4.10a appears to make the
problem go away.
2. The files to be attached remain in the data directory after the message
has been sent.


Date: 2007-10-02 07:12
Sender: simix


Tested on:
php-4.2.3 / apache-1.3.27
php-4.3.9 / apache-2.0.52

register_globals = off

plain vanilla SM-1.4.11, no additional plugins.



Date: 2007-10-02 05:20
Sender: lcd_47


Apache 1.3.37, PHP 4.4.7, Suhosin patch 4.4.7-0.9.6.
register_globals = Off (along with lots of other tweaking to php.ini).

Active plugins:
1. abook_import_export
2. abook_take
3. address_add
4. archive_mail
5. attachment_tnef
6. auto_prune_sent
7. autocomplete
8. block_attach
9. calendar
10. cleanup
11. compose_chars
12. compose_fix
13. delete_move_next
14. empty_trash
15. extract
16. folder_sizes
17. folder_synch
18. get_uuencode
19. image_buttons
20. legend
21. listcommands
22. login_alias
23. mail_fetch
24. message_details
25. newmail
26. preview_pane
27. select_range
28. sent_subfolders
29. msg_flags
30. show_headers
31. show_user_and_ip
32. smallcal
33. squirrel_logger
34. undelete
35. variable_sent_folder
36. view_as_html
37. filters
38. windows
39. change_sqlpass
40. cookie_warning

Versions:
abook_import_export-1.1-1.4.4.tar.gz
address_add-2.1-1.4.0.tar.gz
archive_mail.1.2-1.4.2.tar.gz
attachment_tnef-0.7-1.4.0.tar.gz
autocomplete.2.0-1.0.0.tar.gz
auto_prune_sent-1.1.tar.gz
block_attach.0.7-1.4.5.tar.gz
change_sqlpass-3.3-1.2.tar.gz
cleanup.0.2-1.4.0.tar.gz
compatibility-2.0.4.tar.gz
compose_chars-0.1-1.4.tar.gz
compose_fix.tar.gz
cookie_warning-1.1-1.4.3.tar.gz
empty_trash-1.4-1.2.2.tar.gz
extract.0.1-1.4.0.tar.gz
folder_sizes-1.5-1.4.0.tar.gz
folder_synch.0.8-1.4.0.tar.gz
get_uuencode-3.1-1.4.x.tar.gz
image_buttons-1.4-1.4.tar.gz
legend.1.2-1.2.8.tar.gz
login_alias-2.4-1.2.1.tar.gz
msg_flags-1.4.3.1-1.4.3.tar.gz
newuser_wiz-1.3.2.tar.gz
preview_pane-1.2-1.4.3.tar.gz
select_range-3.5.tar.gz
show_headers-1.3-1.4.tar.gz
show_user_and_ip-3.3-re-1.2.2.tar.gz
smallcal-0.8-1.2.3.tar.gz
squirrel_logger-2.0-1.2.7.tar.gz
undelete.1.0-1.0.tar.gz
variable_sent_folder.0.4-1.4.tar.gz
view_as_html-3.7a-1.4.x.tar.gz
windows-1.6-1.4.tar.gz

More information:
1. Replacing compose.php with the one from 1.4.10a appears to make the
problem go away.
2. The files to be attached remain in the data directory after the message
has been sent.


Date: 2007-10-02 04:50
Sender: janglissProject AdminAccepting Donations


I am unable to duplicate this, or similar issues listed in 1805895, or
1805826.

What are your settings for register_globals? What plugins do you have
enabled?


Attached Files ( 2 )

Filename Description Download
1805471_composeattach.patch Compose, and Addressing Issue Download
1.4.11_compose_attachments.patch Fix ability to add multiple attachments in 1.4.11 Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2007-10-07 03:02 jangliss
resolution_id None 2007-10-07 03:02 jangliss
close_date - 2007-10-07 03:02 jangliss
File Added 248244: 1.4.11_compose_attachments.patch 2007-10-03 20:08 pdontthink
File Added 248161: 1805471_composeattach.patch 2007-10-03 06:46 jangliss
assigned_to nobody 2007-10-03 04:54 jangliss