sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
244 stars 96 forks source link

"Reject" link in moderation e-mail to moderators results in crash / internal server error #1703

Closed bboyle262 closed 10 months ago

bboyle262 commented 1 year ago

Version

6.2.72-3.el7

Installation method

Cent7, RPM install, Mariadb, Postfix

Expected behavior

"Reject" URL in Moderation e-mail ("Message for list ... waiting to be approved") should succeed and reject the message

Actual behavior

After upgrading to latest sympa release, the 'reject' link generated by e-mails to moderators, results in the following crash / internal server error page rather than expected behavior:

"Internal Server Error Sympa encountered an internal error.

Please contact the listmaster.

Error: Parameter $tpl is not defined at /usr/share/sympa/lib/Sympa/Message/Template.pm line 64.

Traceback DIED: Parameter $tpl is not defined at /usr/share/sympa/lib/Sympa/Message/Template.pm line 64. at /usr/share/sympa/lib/Sympa/Message/Template.pm line 64. Sympa::Message::Template::new('Sympa::Message::Template', 'template', undef, 'data', HASH(0x49d70b0), 'context', Sympa::List testlist@lists.<ourdomain.edu>, 'rcpt', 'sender@domain.com', ...) called at /usr/share/sympa/lib/Sympa/Spindle.pm line 42 Sympa::Spindle::new('Sympa::Spindle::ProcessTemplate', 'context', Sympa::List testlist@lists.<ourdomain.edu>, 'template', undef, 'rcpt', 'sender@domain.com', 'data', HASH(0x49d70b0), ...) called at /usr/share/sympa/lib/Sympa.pm line 394 Sympa::send_file(Sympa::List testlist@lists..edu>, undef, 'sender@domain.com', HASH(0x49d70b0)) called at /usr/libexec/sympa/wwsympa.fcgi line 7600 main::do_reject() called at /usr/libexec/sympa/wwsympa.fcgi line 1562"

Steps to reproduce

1) Create new list, send/receive setup of "Private, moderated for non subscribers" (privateoreditorkey) 2) Send e-mail to list from non-subscriber address which should trigger an e-mail to moderators of list, "Message for list from to be approved" 3) Upon clicking the URL following, "To reject it (it will be removed):", the above error is returned by Sympa web interface. 4) Other links in the e-mail work as expected, including the 'distribute' link

Additional information

This has been tested to occur across multiple lists, and multiple robots, on our main server. Behavior also replicated on our dev server with the same setup as listed above.

Thank you

ikedas commented 1 year ago

Hi @bboyle262 ,

Could you please show any examples of the 'reject' link that causes problem?

bboyle262 commented 1 year ago

Screen Shot 2023-07-26 at 2 04 32 PM

Hello @ikedas

They all look like the attached.

Viewing the message source, URLs are coming through in plaintext pointing to same URL as displayed in the e-mail client.

ikedas commented 1 year ago

Hi @bboyle262 ,

Could you please apply this patch and check if the problem will be solved? Thanks.

bboyle262 commented 1 year ago

The patch appears to have solved the issue. Thank you!

SlothOfAnarchy commented 11 months ago

Hi @bboyle262 ,

Could you please apply this patch and check if the problem will be solved? Thanks.

I can also confirm this patch solves the problem. Thank you @ikedas !

phippsac commented 1 month ago

Total noob here, if I want to apply this patch via the Linux patch command to what file do I apply it? Both default/web_tt2/confirm_action.tt2 and src/cgi/wwsympa.fcgi.in? Thanks