Malicious user can abuse UpdateCommitment to create commitments for other users
UpdateCommitment checks that the original lender is msg.sender but never validates that the original lender == new lender. This allows malicious users to effectively create a commitment for another user, allowing them to drain funds from them.\\nLenderCommitmentForwarder.sol#L208-L224\\n```\\nfunction updateCommitment(\\n    uint256 _commitmentId,\\n    Commitment calldata _commitment\\n) public commitmentLender(_commitmentId) { <- @audit-info checks that lender is msg.sender\\n    require(\\n        _commitment.principalTokenAddress ==\\n            commitments[_commitmentId].principalTokenAddress,\\n        "Principal token address cannot be updated."\\n    );\\n    require(\\n        _commitment.marketId == commitments[_commitmentId].marketId,\\n        "Market Id cannot be updated."\\n    );\\n\\n    commitments[_commitmentId] = _commitment; <- @audit-issue never checks _commitment.lender\\n\\n    validateCommitment(commitments[_commitmentId]);\\n```\\n\\nUpdateCommitment is intended to allow users to update their commitment but due to lack of verification of _commitment.lender, a malicious user create a commitment then update it to a new lender. By using bad loan parameters they can steal funds from the attacker user.
Check that the update lender is the same the original lender
UpdateCommitment can be used to create a malicious commitment for another user and steal their funds
```\\nfunction updateCommitment(\\n    uint256 _commitmentId,\\n    Commitment calldata _commitment\\n) public commitmentLender(_commitmentId) { <- @audit-info checks that lender is msg.sender\\n    require(\\n        _commitment.principalTokenAddress ==\\n            commitments[_commitmentId].principalTokenAddress,\\n        "Principal token address cannot be updated."\\n    );\\n    require(\\n        _commitment.marketId == commitments[_commitmentId].marketId,\\n        "Market Id cannot be updated."\\n    );\\n\\n    commitments[_commitmentId] = _commitment; <- @audit-issue never checks _commitment.lender\\n\\n    validateCommitment(commitments[_commitmentId]);\\n```\\n