Revision ee2db55f
Added by Ermal Luçi about 16 years ago
usr/local/www/services_dyndns_edit.php | ||
---|---|---|
34 | 34 |
##|-PRIV |
35 | 35 |
|
36 | 36 |
|
37 |
/* returns true if $uname is a valid DynDNS username */ |
|
38 |
function is_dyndns_username($uname) { |
|
39 |
if (!is_string($uname)) |
|
40 |
return false; |
|
41 |
|
|
42 |
if (preg_match("/[^a-z0-9\-.@_:]/i", $uname)) |
|
43 |
return false; |
|
44 |
else |
|
45 |
return true; |
|
46 |
} |
|
47 |
|
|
37 | 48 |
require("guiconfig.inc"); |
38 | 49 |
|
39 | 50 |
if (!is_array($config['dyndnses']['dyndns'])) { |
Also available in: Unified diff
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.