mirror of https://github.com/huashengdun/webssh
Check pk size before reading
parent
fa717491cd
commit
6401e82ef9
|
@ -336,7 +336,7 @@ jQuery(function($){
|
||||||
}
|
}
|
||||||
|
|
||||||
var pk = data.get('privatekey');
|
var pk = data.get('privatekey');
|
||||||
if (pk) {
|
if (pk && pk.size) {
|
||||||
if (pk.size > key_max_size) {
|
if (pk.size > key_max_size) {
|
||||||
console.log('Invalid private key: ' + pk.name);
|
console.log('Invalid private key: ' + pk.name);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue