diff options
author | h6w <tudor@tudorholton.com> | 2017-10-26 16:19:00 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 16:19:00 +1100 |
commit | 1450e5773480fbebefd6f19fede90a94fec9fb4d (patch) | |
tree | 7c8a3459e98693c7661d9db2ff43de10e1612428 /endpoints | |
parent | 26586b1ea42149db7e603078c93200ef6a233f9d (diff) | |
parent | ab7059433b7c7f7232d3e33435f02e920a9a2702 (diff) | |
download | phpvirtualbox-1450e5773480fbebefd6f19fede90a94fec9fb4d.zip phpvirtualbox-1450e5773480fbebefd6f19fede90a94fec9fb4d.tar.gz phpvirtualbox-1450e5773480fbebefd6f19fede90a94fec9fb4d.tar.bz2 |
Merge pull request #55 from tschoening/fix_decrpytion
Make decryption of images/VMs work by not providing a password ID.
Diffstat (limited to 'endpoints')
-rw-r--r-- | endpoints/lib/vboxServiceWrappers.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/endpoints/lib/vboxServiceWrappers.php b/endpoints/lib/vboxServiceWrappers.php index 7b33f0d..b9ff86b 100644 --- a/endpoints/lib/vboxServiceWrappers.php +++ b/endpoints/lib/vboxServiceWrappers.php @@ -7889,6 +7889,10 @@ class IMedium extends VBox_ManagedObject public function changeEncryption($arg_currentPassword, $arg_cipher, $arg_newPassword, $arg_newPasswordId) { + // No password ID in case of decryption and de-/encryption are both handled here. + $isDecryption = ($arg_cipher == '') && ($arg_newPassword == ''); + $arg_newPasswordId = $isDecryption ? '' : $arg_newPasswordId; + $request = new stdClass(); $request->_this = $this->handle; $request->currentPassword = $arg_currentPassword; |