From 1b871e16ce011d4d342be362a10f4739a1cc7785 Mon Sep 17 00:00:00 2001 From: mecab Date: Wed, 31 Jan 2018 11:30:41 -0600 Subject: [PATCH] Remove unnessesary validation in sending contact form Non-alphanumeric character causes some problems if used in the mail header (i.e., sender name or subject), but the filled info is just used in the mail body so removing the validation is safe at this time. --- include/classes/mail.class.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/classes/mail.class.php b/include/classes/mail.class.php index 4d5e5c6c..b937b1c8 100644 --- a/include/classes/mail.class.php +++ b/include/classes/mail.class.php @@ -14,18 +14,10 @@ class Mail extends Base { **/ public function contactform($senderName, $senderEmail, $senderSubject, $senderMessage) { $this->debug->append("STA " . __METHOD__, 4); - if (preg_match('/[^a-z_\.\!\?\-0-9\\s ]/i', $senderName)) { - $this->setErrorMessage($this->getErrorMsg('E0024')); - return false; - } if (empty($senderEmail) || !filter_var($senderEmail, FILTER_VALIDATE_EMAIL)) { $this->setErrorMessage($this->getErrorMsg('E0023')); return false; } - if (preg_match('/[^a-z_\.\!\?\-0-9\\s ]/i', $senderSubject)) { - $this->setErrorMessage($this->getErrorMsg('E0034')); - return false; - } if (strlen(strip_tags($senderMessage)) < strlen($senderMessage)) { $this->setErrorMessage($this->getErrorMsg('E0024')); return false;