[vhffs-dev] [1647] gpg stuff process data with \n line endings because MIME:: Lite module filters \r, fixing \r\n in messages sent through the panel broadcast feature so that gpg signature is good

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1647
Author:   gradator
Date:     2011-03-05 19:53:57 +0100 (Sat, 05 Mar 2011)
Log Message:
-----------
gpg stuff process data with \n line endings because MIME::Lite module filters \r, fixing \r\n in messages sent through the panel broadcast feature so that gpg signature is good

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Mailings.pm

Modified: trunk/vhffs-api/src/Vhffs/Mailings.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Mailings.pm	2011-01-19 17:53:39 UTC (rev 1646)
+++ trunk/vhffs-api/src/Vhffs/Mailings.pm	2011-03-05 18:53:57 UTC (rev 1647)
@@ -51,6 +51,8 @@
 	
 	return -1 unless defined $vhffs;
 
+	$message =~ s/\r\n/\n/g;
+
 	my $query = 'INSERT INTO vhffs_mailings (subject,message,date,state) VALUES( ? , ? , ? , ? )';
 	my $request = $vhffs->{'db'}->prepare( $query );
 	$request->execute($subject, $message, time(), Vhffs::Constants::WAITING_FOR_CREATION) or return -2;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/