Changeset 3012


Ignore:
Timestamp:
2006-01-18T03:03:27+01:00 (12 years ago)
Author:
nbd
Message:

revert last wep key validation patch, because of device-specific handling of ascii wep keys (see mbm's comment in #222)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/webif/files/usr/lib/webif/validate.awk

    r3011 r3012  
    3939$1 == "wep" { 
    4040        valid_type = 1 
    41         if ((length(value) != 0) && (length(value) != 5) && (length(value) != 10) && (length(value) != 13) && (length(value) != 26)) { 
     41        if (value !~ /^[0-9A-Fa-f]*$/) { 
    4242                valid = 0 
    43                 verr = "Invalid key length: Hex keys must be 10 or 26 hexdigits; Ascii keys must be 5 or 13 chars." 
    44         } else if (((length(value) == 10) || (length(value) == 26)) && (value !~ /^[0-9A-Fa-f]*$/)) { 
     43                verr = "Invalid value" 
     44        } else if ((length(value) != 0) && (length(value) != 10) && (length(value) != 26)) { 
    4545                valid = 0 
    46                 verr = "Invalid key: Hex keys may only contain hexdigits (0-9,A-F,a-f)" 
     46                verr = "Invalid key length" 
    4747        } else if (value ~ /0$/) { 
    4848                valid = 0 
Note: See TracChangeset for help on using the changeset viewer.