diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-07 17:24:28 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-07 17:24:28 +0000 |
commit | ee2db55f73eaa2639fa9aa35a469eebd52aa7e5a (patch) | |
tree | 60133f2270d5caef7a7fa59d22cfe5466a0c36aa | |
parent | 21fcd99a621c1b761f04542b297ee77142d8a40e (diff) | |
download | pfsense-ee2db55f73eaa2639fa9aa35a469eebd52aa7e5a.zip pfsense-ee2db55f73eaa2639fa9aa35a469eebd52aa7e5a.tar.gz |
Move validation of dyndns username to the only place it uses it, the GUI page. There it makes sense. While there add ':' character to allow NO-ip subaccounts.
-rw-r--r-- | etc/inc/util.inc | 11 | ||||
-rw-r--r-- | usr/local/www/services_dyndns_edit.php | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index b129824..8968428 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -213,17 +213,6 @@ function is_domain($domain) { return false; } -/* returns true if $uname is a valid DynDNS username */ -function is_dyndns_username($uname) { - if (!is_string($uname)) - return false; - - if (preg_match("/[^a-z0-9\-.@_]/i", $uname)) - return false; - else - return true; -} - /* returns true if $macaddr is a valid MAC address */ function is_macaddr($macaddr) { if (!is_string($macaddr)) diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php index 0cee2c0..8cfafc1 100644 --- a/usr/local/www/services_dyndns_edit.php +++ b/usr/local/www/services_dyndns_edit.php @@ -34,6 +34,17 @@ ##|-PRIV +/* returns true if $uname is a valid DynDNS username */ +function is_dyndns_username($uname) { + if (!is_string($uname)) + return false; + + if (preg_match("/[^a-z0-9\-.@_:]/i", $uname)) + return false; + else + return true; +} + require("guiconfig.inc"); if (!is_array($config['dyndnses']['dyndns'])) { |