Commit 1d13a5dd authored by Franco Fichtner's avatar Franco Fichtner

system: fix crash report

If configd doesn't respond the JSON is not available, which we really
need a wrapper for doing this fallback all the time and maybe even
with error reporting inside that returned array.

(cherry picked from commit d79c1acf)
parent 2e29de6c
...@@ -383,6 +383,9 @@ include("head.inc"); ...@@ -383,6 +383,9 @@ include("head.inc");
<select name="ssl-ciphers[]" class="selectpicker" multiple="multiple" data-live-search="true" title="<?=gettext("System defaults");?>"> <select name="ssl-ciphers[]" class="selectpicker" multiple="multiple" data-live-search="true" title="<?=gettext("System defaults");?>">
<?php <?php
$ciphers = json_decode(configd_run("system ssl ciphers"), true); $ciphers = json_decode(configd_run("system ssl ciphers"), true);
if ($ciphers == null) {
$ciphers = array();
}
foreach ($ciphers as $cipher => $cipher_data):?> foreach ($ciphers as $cipher => $cipher_data):?>
<option value="<?=$cipher;?>" <?= !empty($pconfig['ssl-ciphers']) && in_array($cipher, $pconfig['ssl-ciphers']) ? 'selected="selected"' : '' ?>> <option value="<?=$cipher;?>" <?= !empty($pconfig['ssl-ciphers']) && in_array($cipher, $pconfig['ssl-ciphers']) ? 'selected="selected"' : '' ?>>
<?=!empty($cipher_data['description']) ? $cipher_data['description'] : $cipher;?> <?=!empty($cipher_data['description']) ? $cipher_data['description'] : $cipher;?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment