diff --git a/src/etc/inc/plugins.inc.d/openvpn.inc b/src/etc/inc/plugins.inc.d/openvpn.inc index b6bb30658..5fa1e1b39 100644 --- a/src/etc/inc/plugins.inc.d/openvpn.inc +++ b/src/etc/inc/plugins.inc.d/openvpn.inc @@ -271,13 +271,13 @@ function openvpn_get_cipherlist() $ciphers = array(); exec('/usr/local/sbin/openvpn --show-ciphers', $lines); foreach ($lines as $line) { - if (strstr($line, '(') !== false) { + if (strstr($line, ' (') !== false) { $cipher = explode(' ', $line)[0]; $ciphers[$cipher] = $line; } } - ksort($ciphers); - $ciphers["none"] = gettext("None (No Encryption)"); + ksort($ciphers, SORT_STRING | SORT_FLAG_CASE); + $ciphers['none'] = gettext('None (No Encryption)'); return $ciphers; }