View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17354 | Bug reports | RemoteControl | public | 2021-06-07 11:02 | 2023-07-28 11:33 |
Reporter | orsayman | Assigned To | ollehar | ||
Priority | none | Severity | partial_block | ||
Status | assigned | Resolution | open | ||
Product Version | 3.25.20 | ||||
Summary | 17354: Invalid XML document in XML-RPC API | ||||
Description | Our (python) script used to automate invitations and reminders based on the XML-RPC API no longer works. The problem comes from the fact the send_invitation function returns an invalid XML document. Below is an example of the response (the name and email is anonymized): <methodResponse><params><param><value><struct><member><name><![CDATA[6]]></name>\n<value><struct><member><name><![CDATA[name]]></name>\n<value><string><![CDATA[XXXX XXXX]]>/string>\n</value></member><member><name><![CDATA[email]]></name>\n<value><string><![CDATA[xxxx@example.org]]</string>\n</value></member><member><name><![CDATA[status]]></name>\n<value><string><![CDATA[OK]]></string>\n</value></member></struct></value></member><member><name><![CDATA[status]]></name>\n<value><string><![CDATA[0 left to send]]></string>\n</value></member></struct></value></param></params></methodResponse>2021-06-04 16:10:39 CLIENT -> SERVER: QUIT The string "2021-06-04 16:10:39 CLIENT -> SERVER: QUIT" is not valid causing python XML parser to stop. This happens when "SMTP debug mode" is set to "on errors". I don't know if it affects the web interface (since I guess this is based on the API). | ||||
Steps To Reproduce | Use the send_invitation XML-RPC method with "SMTP debug mode" set to "on errors" (this probably happen when setting to "always" too) and try too parse the XML reponse. | ||||
Tags | No tags attached. | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 3.27.1 build 210531 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | This is independant of the browser | ||||
Database type & version | MySQL 5.7 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.4.19 | ||||
Is this a regression? Does it work if you disable SMTP debugging? |
|
Sorry, I forgot to mention that it works when SMTP debugging is turned off (see https://forums.limesurvey.org/forum/development/124674-bug-in-the-xml-rpc-api). I am not 100% sure if it's a regression: I know that the script worked when we tested it a few weeks ago (before upgrade to 3.27.1) but I can't remember if SMTP debugging was on or off at the time. If I'm correct, the problem comes from PHPmailer (see file SMTP.php, line 924). Still hypothetizing that I'm correct, PHPmailer hasn't been updated for 2 years so the problem was probably there before. |
|
Seems like logging can be configured inside phpmailer to different types of output: error_log, echo. Not sure how to do that, tho, or if we support it. |
|
I don't think it would be very hard to do (just a call to setDebugoutput https://phpmailer.github.io/PHPMailer/classes/PHPMailer.PHPMailer.SMTP.html#method_setDebugOutput). Using error_log should be just fine. Am I wrong ? |
|
Using error_log instead of echo would fix it, I think. |
|
Great. Maybe you could also add a note somewhere to indicate that SMTP debug log is in PHP error_log file. |
|
@ollehar : maybe we can auto set maildebug to 0 in 3.X (and unsure we need it) |
|
We had some SMTP issues when we installed our limesurvey instance that's why we used the debug option (although I can't remember if it helped). I think it can be useful. |
|
Any news ? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-06-07 11:02 | orsayman | New Issue | |
2021-06-07 12:38 | ollehar | Product Version | => 3.25.20 |
2021-06-07 12:38 | ollehar | Description Updated | |
2021-06-07 12:41 | ollehar | Note Added: 64765 | |
2021-06-07 12:41 | ollehar | Assigned To | => ollehar |
2021-06-07 12:41 | ollehar | Status | new => feedback |
2021-06-07 13:53 | orsayman | Note Added: 64766 | |
2021-06-07 13:53 | orsayman | Status | feedback => assigned |
2021-06-07 14:33 | ollehar | Note Added: 64767 | |
2021-06-07 23:51 | orsayman | Note Added: 64776 | |
2021-06-08 15:01 | ollehar | Note Added: 64782 | |
2021-06-08 15:13 | orsayman | Note Added: 64784 | |
2021-06-09 14:00 | DenisChenu | Note Added: 64800 | |
2021-06-09 14:00 | DenisChenu | Note Edited: 64800 | |
2021-06-09 16:16 | orsayman | Note Added: 64805 | |
2021-06-15 19:40 | orsayman | Note Added: 64921 | |
2023-07-28 11:33 |
|
Bug heat | 6 => 8 |
2023-07-28 15:00 | c_schmitz | Bug heat | 8 => 6 |