aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index baf1f4812..c90d05130 100644
--- a/boot.php
+++ b/boot.php
@@ -1160,13 +1160,25 @@ function validate_url(&$url) {
$url = 'http://' . $url;
$h = parse_url($url);
- if(! $h) {
- return false;
+ if(($h) && (checkdnsrr($h['host'], 'ANY'))) {
+ return true;
}
- if(! checkdnsrr($h['host'], 'ANY')) {
+ return false;
+}}
+
+// checks that email is an actual resolvable internet address
+
+if(! function_exists('validate_email')) {
+function validate_email($addr) {
+
+ if(! strpos($addr,'@'))
return false;
+ $h = substr($addr,strpos($addr,'@') + 1);
+
+ if(($h) && (checkdnsrr($h, 'ANY'))) {
+ return true;
}
- return true;
+ return false;
}}
// Check $url against our list of allowed sites,