LSattr_html :: ssh_key : fix regex

This commit is contained in:
Benjamin Renard 2017-12-22 16:42:07 +01:00
parent 2c79e92cbf
commit 11abb3e1f8

View file

@ -60,7 +60,7 @@ class LSformElement_ssh_key extends LSformElement {
$values_txt = array();
foreach ($this -> values as $value) {
if (ereg('^ssh-([a-z]+) (.*)== (.*)$',$value,$regs)) {
if (preg_match('/^ssh-([a-z0-9]+) +([^ ]+) +(.*)$/',$value,$regs)) {
$values_txt[] = array(
'type' => $regs[1],
'shortTxt' => substr($regs[2],0,10),