diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-15 13:11:08 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-15 13:11:08 -0300 |
commit | aff470b3efa671f6c04107f718d359054a739bdc (patch) | |
tree | efa08835f1ff9c8d01ed93c08b614f056fd6cb4f /src/leap/bitmask/services/eip/eipconfig.py | |
parent | 43a67207845943d5e93c51844feb6666ac1911f5 (diff) | |
parent | 9e89e4fc8dba7541f3475de0183b47fa9342ea84 (diff) |
Merge branch 'release/0.7.x' into develop
Conflicts:
pkg/tuf/release.py
relnotes.txt
Diffstat (limited to 'src/leap/bitmask/services/eip/eipconfig.py')
-rw-r--r-- | src/leap/bitmask/services/eip/eipconfig.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/leap/bitmask/services/eip/eipconfig.py b/src/leap/bitmask/services/eip/eipconfig.py index 5b51d12e..659ca1b1 100644 --- a/src/leap/bitmask/services/eip/eipconfig.py +++ b/src/leap/bitmask/services/eip/eipconfig.py @@ -216,7 +216,7 @@ class EIPConfig(ServiceConfig): """ _service_name = "eip" - OPENVPN_ALLOWED_KEYS = ("auth", "cipher", "tls-cipher") + OPENVPN_ALLOWED_KEYS = ("auth", "cipher", "tls-cipher", "fragment") OPENVPN_CIPHERS_REGEX = re.compile("[A-Z0-9\-]+") def __init__(self): @@ -255,6 +255,11 @@ class EIPConfig(ServiceConfig): These are sanitized with alphanumeric whitelist. + NOTE: some openvpn config option don't take a value, but + this method currently requires that every option has a value. + Also, this does not yet work with values with spaces, like + `keepalive 10 30` + :returns: openvpn configuration dict :rtype: C{dict} """ @@ -262,7 +267,7 @@ class EIPConfig(ServiceConfig): config = {} for key, value in ovpncfg.items(): if key in self.OPENVPN_ALLOWED_KEYS and value is not None: - sanitized_val = self.OPENVPN_CIPHERS_REGEX.findall(value) + sanitized_val = self.OPENVPN_CIPHERS_REGEX.findall(str(value)) if len(sanitized_val) != 0: _val = sanitized_val[0] config[str(key)] = str(_val) |