libs/web: fix error in wep key validation
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 16 Dec 2010 15:59:25 +0000 (15:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 16 Dec 2010 15:59:25 +0000 (15:59 +0000)
libs/web/luasrc/cbi/datatypes.lua

index 62f06c4b403b552aeb130c8a6300a68f9f15751d..67cb63daf048ec8d4511f27560fb7c8103a280b6 100644 (file)
@@ -154,7 +154,7 @@ function wepkey(val)
        if (#val == 10) or (#val == 26) then
                return (val:match("^[a-fA-F0-9]+$") ~= nil)
        else
-               return (#v == 5) or (#v == 13)
+               return (#val == 5) or (#val == 13)
        end
 end