summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--endpoints/lib/vboxServiceWrappers.php4
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;