Skip to content

Commit fd09618

Browse files
committed
update ssh_validate for new testValidSSHKey
1 parent a9af153 commit fd09618

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

webroot/js/ajax/ssh_validate.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
use UnityWebPortal\lib\UnityHTTPD;
88

99
header('Content-Type: application/json; charset=utf-8');
10-
echo jsonEncode(["is_valid" => testValidSSHKey(UnityHTTPD::getPostData("key"))]);
10+
[$is_valid, $expanation] = testValidSSHKey(UnityHTTPD::getPostData("key"));
11+
echo jsonEncode(["is_valid" => $is_valid, "explanation" => $explanation]);

webroot/panel/modal/new_key.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ function generateKey(type) {
107107
} else {
108108
$("input[id=add-key]").prop("disabled", true);
109109
$("textarea[name=key]").css("box-shadow", "0 0 0 0.3rem rgba(220,53,69,0.25)");
110+
console.log(result.explanation);
110111
}
111112
}
112113
});

0 commit comments

Comments
 (0)