commit 6401e82ef94bc1dc01fe4459244fd088351534c4
parent fa717491cdf7896fafffdef1bca70a919e1cd1cb
Author: Sheng <webmaster0115@gmail.com>
Date: Wed, 29 Aug 2018 11:31:20 +0800
Check pk size before reading
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js
@@ -336,7 +336,7 @@ jQuery(function($){
}
var pk = data.get('privatekey');
- if (pk) {
+ if (pk && pk.size) {
if (pk.size > key_max_size) {
console.log('Invalid private key: ' + pk.name);
} else {