diff options
author | Bill Marquette <billm@pfsense.org> | 2005-09-05 01:29:19 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-09-05 01:29:19 +0000 |
commit | beeef1f0f77f5b83a8bad0ea61b90e2a08a7235a (patch) | |
tree | e34afa75d5101e2ce4286aad7299d2fca766ff33 /etc | |
parent | ac4878f9aecceb2d9d6e2028d8ee5c4aac25ab60 (diff) | |
download | pfsense-beeef1f0f77f5b83a8bad0ea61b90e2a08a7235a.zip pfsense-beeef1f0f77f5b83a8bad0ea61b90e2a08a7235a.tar.gz |
(#458) create reserved word list - we'll stumble over more reserved words in the future
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 24b84ce..f4661ce 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -206,6 +206,11 @@ function is_macaddr($macaddr) { /* returns true if $name is a valid name for an alias */ function is_validaliasname($name) { + /* Array of reserved words */ + $reserved = array("port"); + if (in_array($name, $reserved)) + return -1; + if (!preg_match("/[^a-zA-Z0-9]/", $name)) return true; else |