mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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.
This commit is contained in:
parent
21fcd99a62
commit
ee2db55f73
@ -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))
|
||||
|
||||
@ -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'])) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user