Changeset 197
- Timestamp:
- 15/11/06 11:55:09 (2 years ago)
- Files:
-
- blog.lib.php (modified) (2 diffs)
- miscfunctions.lib.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
blog.lib.php
r195 r197 579 579 //sanitise comment 580 580 if (isset($_POST['comment']) && trim($_POST['comment']) != "") { 581 $comment = addslashes(nl2br(trim(strip_tags($_POST['comment'])))); 582 } 583 else { 581 if(strip_tags($_POST['comment']) == $_POST['comment']) { 582 $comment = addslashes(nl2br(trim($_POST['comment']))); 583 } else { 584 $this->commentError = _("HTML within comments is not allowed, Please remove all html tags and try again"); 585 $element = "comment"; 586 } 587 } else { 584 588 $this->commentError = _("Please check the comment field"); 585 589 $element = "comment"; … … 590 594 //force this comment though moderation 591 595 $this->comment_moderation = true; 592 } 593 else { 596 } else { 594 597 $spam = false; 595 598 } 596 597 599 //sanitise email 598 600 if (isset($_POST['email']) && trim($_POST['email']) != "" && validEmail(trim($_POST['email']))) { 599 601 $email = addslashes(trim($_POST['email'])); 600 } 601 else { 602 $this->commentError = _("Check email address"); 602 } else { 603 $this->commentError = _("Check email address, it does not apear to be valid."); 603 604 $element = "email"; 604 605 } 605 606 //sanitse author 606 607 if (isset($_POST['author']) && trim($_POST['author']) != "") { 607 $author = addslashes(nl2br(trim(strip_tags($_POST['author'])))); 608 if(eregi("^([a-z0-9]+ *)+$", $_POST['author'])) { 609 $author = addslashes(nl2br(trim(strip_tags($_POST['author'])))); 610 } else { 611 $this->commentError = _("Invalid name. We only allow alphanumeric names!"); 612 $element = "author"; 613 } 608 614 } 609 615 else { 610 $this->commentError = _(" Checkyour name.");616 $this->commentError = _("Please give us your name."); 611 617 $element = "author"; 612 618 } miscfunctions.lib.php
r196 r197 85 85 $two_level_tlds[trim($TLD)] = true; 86 86 } 87 if (!$matches) 88 return; 87 89 //for each url 88 90 foreach ($matches as $url) { … … 98 100 } 99 101 } 102 if (!$URLstoTest) 103 return; 100 104 //actualy test each of he domains against the surbl 101 105 foreach($URLstoTest as $url) {
