From: Dave C. <da...@da...> - 2002-01-21 17:53:53
|
----- Forwarded message from Chris Benson <ch...@tr...> ----- Return-Path: <ch...@tr...> Received: from localhost (localhost.localdomain [127.0.0.1]) by tma1.mag-sol.demon.co.uk (8.11.6/8.11.6) with ESMTP id g0LHldB02006 for <dave@localhost>; Mon, 21 Jan 2002 17:47:45 GMT Envelope-to: da...@da... Delivery-date: Mon, 21 Jan 2002 12:41:50 -0500 Received: from mail.dave.org.uk [216.167.89.88] by localhost with POP3 (fetchmail-5.9.0) for dave@localhost (single-drop); Mon, 21 Jan 2002 17:47:45 +0000 (GMT) Received: from [217.23.232.72] (helo=skuld.office) by linux873.dn.net with esmtp (Exim 3.22 #1) id 16SiS5-0005ZH-00 for da...@da...; Mon, 21 Jan 2002 12:41:49 -0500 Received: (from chrisb@localhost) by skuld.office (8.11.6/8.9.3) id g0LGRXA05199 for da...@da...; Mon, 21 Jan 2002 16:27:33 GMT Date: Mon, 21 Jan 2002 16:27:33 +0000 From: Chris Benson <ch...@tr...> To: da...@da... Subject: NMS FormMail patch Message-ID: <20020121162733.GA5182@skuld.office> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i Hi, I've got a form with checkboxes. If the user selects multiple boxes, the message sent looks like: courses: ARRAY(0x823aa10) :-( The following fixes it ... I shouldn't've read the ?: thread on London.pm this morning :-) I'm using 1.16 but the latest 1.25 also needs it. Thanks for doing this: I'm getting a few dozen attempts daily at (versions of) cgi-bin/formmail.pl and (so far today) 6 attempts to abuse it as if it were MW's original ... --- FormMail.pl.orig Mon Jan 21 16:14:05 2002 +++ FormMail.pl Mon Jan 21 16:23:39 2002 @@ -470,7 +470,7 @@ foreach (@sorted_keys) { if ($Config{'print_blank_fields'} || defined $Form{$_}) { - print MAIL "$_: $Form{$_}\n\n"; + print MAIL "$_: ", (ref $Form{$_} ? "@{$Form{$_}}" : $Form{$_}), "\n\n"; } } -- Chris Benson Tel. +44 191 516 6355 ----- End forwarded message ----- -- "Don't you boys know any _nice_ songs?" |