GithubHelp home page GithubHelp logo

Comments (1)

ams-tschoening avatar ams-tschoening commented on July 18, 2024

I've investigated further and the first dialogue above results in the following data being sent to the server:

{"fn":"mediumChangeEncryption","params":{"medium":"...","id":"...","old_password":"...","cipher":"","password":""},"persist":null}:

which leads to the following code in the server:

	    /* @var $progress IProgress */
	    $progress = $m->changeEncryption($args['old_password'],
	            $args['cipher'], $args['password'], $args['id']);
    public function changeEncryption($arg_currentPassword, $arg_cipher, $arg_newPassword, $arg_newPasswordId)
    {
        $request = new stdClass();
        $request->_this = $this->handle;
        $request->currentPassword = $arg_currentPassword;
        $request->cipher = $arg_cipher;
        $request->newPassword = $arg_newPassword;
        $request->newPasswordId = $arg_newPasswordId;
        $response = $this->connection->__soapCall('IMedium_changeEncryption', array((array)$request));
        return new IProgress ($this->connection, $response->returnval);
    }

So it's pretty clear that simply all available data is forwarded to VirtualBox and while cipher and password are empty, the password Id is not, therefore forwarded and results in the error thrown by VirtualBox.

So how to fix this? I think the easiest way is to directly check in this function if the cipher and new password are empty and don't forward the password ID in that case. Seems better than to provide another API only for decryption.

from phpvirtualbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.