[Mimedefang] perl problem

Mack roaringpenguin.com at bass-speaker.com
Thu Nov 10 07:56:13 EST 2005


    my $newrecip =$recip;
    $newrecip =~ s/'/''/gi;
$sth1 = $dbh->prepare("SELECT value FROM userpref WHERE username =
'$recip' && preference='whitelist_from'");


that will fix it, (replacing the ' with '') be carefull of \' as well if you are using mysql

Mack


-----Original Message-----
From: mimedefang-bounces at lists.roaringpenguin.com
[mailto:mimedefang-bounces at lists.roaringpenguin.com]On Behalf Of B.
Tolka
Sent: Thursday 10 November 2005 12:44
To: mimedefang at lists.roaringpenguin.com
Subject: [Mimedefang] perl problem


I my milter I have a mysql call below.   

$sth1 = $dbh->prepare("SELECT value FROM userpref WHERE username =
'$recip' && preference='whitelist_from'");


My slave is always getting killed because of an aprostophe in an email
address.   It fails at '$recip'.   

Is there another way to code the above line??


Thanks

Bryan Tolka
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

This Email Has Been Anti-Virus Scanned





More information about the MIMEDefang mailing list