summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dyndns_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_dyndns_edit.php')
-rw-r--r--usr/local/www/services_dyndns_edit.php11
1 files changed, 11 insertions, 0 deletions
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'])) {
OpenPOWER on IntegriCloud