Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion endpoints/lib/vboxconnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,7 @@ public function remote_consoleAddDiskEncryptionPasswords($args) {
}

try {
$this->session->console->addDiskEncryptionPassword($creds['id'], $creds['password'], (bool)@$args['clearOnSuspend']);
$this->session->console->addDiskEncryptionPassword($creds['id'], $creds['password'], (bool)$creds['clearOnSuspend']);
$response['accepted'][] = $creds['id'];
} catch (Exception $e) {
$response['failed'][] = $creds['id'];
Expand Down
23 changes: 14 additions & 9 deletions panes/mediumEncryptionPasswords.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--

Store medium encryption passwords in memory

Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)

$Id: mediumEncryptionPasswords.html 596 2015-04-19 11:50:53Z imoore76 $

-->
<div id='vboxMediumEncryptionPasswords'>
<div class='vboxBordered'>
Expand All @@ -15,6 +15,7 @@
<th class='translate' style='width:1%; text-align:center'>Status</th>
<th class='translate' style='width:30%; text-align:center'>ID</th>
<th class='translate'>Password</th>
<th class='translate'>Clear on suspend</th>
</tr>
</thead>
<tbody id='vboxMediumEncryptionPasswordList'>
Expand All @@ -36,28 +37,32 @@
)
.append($('<td />')
.append(
valid ? '*****' :
valid ? '*****' :
$('<input />').attr({'type':'password','style':'width:95%'}).addClass('vboxText')
)
)
.append($('<td />')
.append($('<input />').attr({'type':'checkbox', 'checked':'checked'}))
)
.appendTo($('#vboxMediumEncryptionPasswordList'))
}

function vboxMediumEncryptionPasswordsGet() {

if(!vboxMediumEncryptionPasswordsValidateInput())
return false;

var encryptionPWs = [];
var rowlist = $('#vboxMediumEncryptionPasswordList').children();
for(var i = 0; i < rowlist.length; i++) {
if($(rowlist[i]).data('vboxAlreadySupplied'))
continue;
encryptionPWs.push({
'id': $(rowlist[i]).data('vboxEncryptionId'),
'password': $(rowlist[i]).find('input').first().val()
'password': $(rowlist[i]).find('input[type="password"]').first().val(),
'clearOnSuspend': $(rowlist[i]).find('input[type="checkbox"]').first().is(':checked') ? '1' : '0'
});

}
return encryptionPWs;
}
Expand All @@ -75,4 +80,4 @@
});
return valid;
}
</script>
</script>