[Bug 26948] New: Some Koha Emails are double encoded (HOLD, ODUE, ...)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Bug ID: 26948 Summary: Some Koha Emails are double encoded (HOLD, ODUE, ...) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 22343 After the refactoring in bug 22343 some emails sent from Koha are double encoded, meaning they show us garbled for the email recipient. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22343 [Bug 22343] Add configuration options for SMTP servers -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 113242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113242&action=edit Bug 22343: (QA follow-up) Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113242|0 |1 is obsolete| | --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 113243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113243&action=edit Bug 22343: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 113244 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113244&action=edit Bug 26948: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113243|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 113245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113245&action=edit Bug 26948: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Tomás Cohen Arazi from comment #4)
Created attachment 113245 [details] [review] Bug 26948: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
As discussed on #koha@freenode IRC channel, the test didn't test this particular issue. This still would benefit from a regression test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113245|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical Keywords| |rel_20_11_target --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Upping severity here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113244|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113545&action=edit Bug 26948: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113545|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 113553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113553&action=edit Bug 26948: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113555&action=edit Bug 26948: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113553|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113558&action=edit Bug 26948: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113559&action=edit Bug 26948: Regression tests We already mock the send_or_die method from Email::Stuffer; This patch updates that mock to extract the internal representation of the email encoded message and looks for a known double encoded representation of a character in the sample body. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #113555|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113558|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113560&action=edit Bug 26948: Remove double encoding from sent emails The sent emails from Koha were garbled / double encoded because Koha::Email now after the refactoring and moving to use Email::Stuffer handles the encoding itself. Previously the Koha::Email callee had to handle the encoding. This patch removes the double encoding in the email subject and content. To test: 1) Put some UTF-8 characters like ä in the HOLD template subject and body 2) Create hold and check-in an item to make it Waiting and cause the email to be send 3) Notice the email comes garbled / double encoded 4) Apply patch 5) Repeat step 2) and notice the email comes without any issues in encoding and look OK. 6) Make sure "prove t/Koha/Email.t" and "prove t/db_dependent/Letters.t" and passes Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113559|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113561&action=edit Bug 26948: Regression tests We already mock the send_or_die method from Email::Stuffer; This patch updates that mock to extract the internal representation of the email encoded message and looks for a known double encoded representation of a character in the sample body. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ooops, collision.. I've restored your second SO/QA Kyle. So, this isn't my neatest work, but it does at least add a regression test for the content double encoding.. the subject could likely be covered in a similar way but my brain was failing me to see how to check that. Unit tests++ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies for 20.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Bug 26948 depends on bug 22343, which changed state. Bug 22343 Summary: Add configuration options for SMTP servers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22343 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|nugged@gmail.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26948 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|nugged@gmail.com | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org