[Bug 22838] New: Warning from runreport.pl 'Explicitly setting a MIME header field (content-type) is dangerous'
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 Bug ID: 22838 Summary: Warning from runreport.pl 'Explicitly setting a MIME header field (content-type) is dangerous' Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Target Milestone: --- Explicitly setting a MIME header field (content-type) is dangerous: use the attr() method instead. at misc/cronjobs/runreport.pl line 312. It seems the error comes from Koha/Email.pm: 72 $mail{'Content-Type'} = $params->{contenttype} if $params->{contenttype}; -- 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=22838 --- Comment #1 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 96383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96383&action=edit Bug 22838: Remove MIME header warnings from runreports.pl Test plan: - create a savedsql report - run misc/cronjob/runreport.pl with options --format set to html and --to any email - check plack errors log, you should get a warning - apply patch - repeat runreport.pl step - check plack errors log, no additional warning there should be -- 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=22838 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|NEW |Needs Signoff -- 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=22838 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=22838 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96383|0 |1 is obsolete| | --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96515&action=edit Bug 22838: Remove MIME header warnings from runreports.pl Test plan: - create a savedsql report - run misc/cronjob/runreport.pl with options --format set to html and --to any email - check plack errors log, you should get a warning - apply patch - repeat runreport.pl step - check plack errors log, no additional warning there should be Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- 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=22838 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96641 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96641&action=edit Bug 22838: Specify a content-type for other formats -- 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=22838 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #3)
Created attachment 96641 [details] [review] Bug 22838: Specify a content-type for other formats
What about this patch? Should not we set content-type for other formats as well? -- 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=22838 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |arthur.suzuki@biblibre.com |ity.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=22838 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- $msg->attr("content-type" => $contenttype); See first comment. This is not recommended. Normally you use Type in MIME::Lite. Furthermore it seems that the same content-type now is applied to both message and attachment. Obviously, they could be different and should be handled individually. This needs some more attention. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 Koha Team University Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr --- Comment #7 from Koha Team University Lyon 3 <koha@univ-lyon3.fr> --- When we run runreport.pl with format option as html (koha version 19.11), we still obtain this warning : "Explicitly setting a MIME header field (content-type) is dangerous: use the attr() method instead. at runreport.pl line 326" We don't get it with format=csv. Olivier Crouzet -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 --- Comment #8 from Koha Team University Lyon 3 <koha@univ-lyon3.fr> --- Hello, could someone have a look at this one? Thanks, Sonia -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22838 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- On master: kohadev-koha@kohadevbox:/kohadevbox/koha$ perl misc/cronjobs/runreport.pl 2 --format html --to foo@example.org It does not return any warnings. Certainly fixed by bug 22343. *** This bug has been marked as a duplicate of bug 22343 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org