View Issue Details

IDProjectCategoryView StatusLast Update
0020117phpList 3 applicationBounce Managementpublic06-12-19 14:46
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.4.8 
Target Version3.4.9Fixed in Version3.4.9-RC1 
Summary0020117: processbounces has sql error inserting into user_message_bounce table
DescriptionWhen processing bounces an sql error is reported

phpList - Database error 1064 while doing query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '04:38
            )' at line 13
phpList - Sql error INSERT INTO phplist_user_message_bounce
            (
                        user,
                        message,
                        bounce,
                        time
            )
            VALUES
            (
                        2095,
                        -1,
                        1342,
                        2019-11-17 04:38
            )

The error is caused by the sql query not enclosing the timestamp value in quotes.

The code was changed in an earlier pull request https://github.com/phpList/phplist3/pull/536 that seems not to have had the desired effect. The timestamp field in user_message_bounce is set automatically on insert and update to the current time. The earlier change was trying to make that field hold the time of the bounce itself.

The reason for the change was an earlier Mantis issue https://mantis.phplist.org/view.php?id=18078 to display the time of the bounce on the user profile, not the time that the bounce was inserted into the database. Even after this change the user profile still displays the time of insertion, not the time of the bounce. The time of the bounce can be obtained by modifying the query to get the time of bounce from the bounce table.
TagsNo tags attached.

Activities

michiel

18-11-19 22:02

manager   ~0062831

@suela that seems quite serious and we should fix it in the next release.

michiel

18-11-19 22:04

manager   ~0062832

Actually, re-reading it, basically it falls back to the original functionality and the fix that was applied did not work.

So, it's not too critical, but still nice to fix.