Browse Source

valid host checks were returning true on TXT records and other useless garbage

pull/1/head
Friendika 11 years ago
parent
commit
0fb3aa1b57
2 changed files with 3 additions and 2 deletions
  1. +2
    -2
      boot.php
  2. +1
    -0
      index.php

+ 2
- 2
boot.php View File

@ -1481,7 +1481,7 @@ function validate_url(&$url) {
$url = 'http://' . $url;
$h = parse_url($url);
if(($h) && (checkdnsrr($h['host'], 'ANY'))) {
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR))) {
return true;
}
return false;
@ -1496,7 +1496,7 @@ function validate_email($addr) {
return false;
$h = substr($addr,strpos($addr,'@') + 1);
if(($h) && (checkdnsrr($h, 'ANY'))) {
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR + DNS_MX))) {
return true;
}
return false;


+ 1
- 0
index.php View File

@ -127,6 +127,7 @@ else
* further processing.
*/
if(strlen($a->module)) {
if(file_exists("mod/{$a->module}.php")) {
include("mod/{$a->module}.php");


Loading…
Cancel
Save