Anyone can withdraw user's Velo Deposit NFT after approval is given to depositor
`Depositor#withdrawFromGauge` is a public function that can be called by anyone which transfers token to `msg.sender`. `withdrawFromGauge` burns the NFT to be withdrawn, which means that `Depositor` must either be approved or be in possession of the NFT. Since it doesn't transfer the NFT to the contract before burning the user must either send the NFT to the `Depositor` or `approve` the `Depositor` in a separate transaction. After the NFT is either transferred or approved, a malicious user could withdraw the NFT for themselves.\\n```\\nfunction withdrawFromGauge(uint256 _NFTId, address[] memory _tokens)  public  {\\n    uint256 amount = depositReceipt.pooledTokens(_NFTId);\\n    depositReceipt.burn(_NFTId);\\n    gauge.getReward(address(this), _tokens);\\n    gauge.withdraw(amount);\\n    //AMMToken adheres to ERC20 spec meaning it reverts on failure, no need to check return\\n    //slither-disable-next-line unchecked-transfer\\n    AMMToken.transfer(msg.sender, amount);\\n}\\n```\\n\\n`Depositor#withdrawFromGauge` allows anyone to call it, burning the NFT and sending `msg.sender` the withdrawn tokens.\\n```\\nfunction burn(uint256 _NFTId) external onlyMinter{\\n    require(_isApprovedOrOwner(msg.sender, _NFTId), "ERC721: caller is not token owner or approved");\\n    delete pooledTokens[_NFTId];\\n    delete relatedDepositor[_NFTId];\\n    _burn(_NFTId);\\n}\\n```\\n\\n`Depositor` calls `DepositReceipt_Base#burn`, which means that it must be either the owner or approved for the NFT. Since `Depositor#withdrawFromGauge` doesn't transfer the NFT from the user, this must happen in a separate transaction. Between the user approval/transfer and them calling `Depositor#withdrawFromGauge` a malicious user could call `Depositor#withdrawFromGauge` first to withdraw the NFT and steal the users funds. This would be very easy to automate with a bot.\\nExample: `User A` deposits 100 underlying into their `Depositor` and is given `Token A` which represents their deposit. After some time they want to redeem `Token A` so they `Approve` their `Depositor` for `Token A`. `User B` sees the approval and quickly calls `Depositor#withdrawFromGauge` to withdraw `Token A`. `User B` is sent the 100 tokens and `Token A` is burned from `User A`.
Only allow owner of NFT to withdraw it:\\n```\\n    function withdrawFromGauge(uint256 _NFTId, address[] memory _tokens)  public  {\\n+       require(depositReceipt.ownerOf(_NFTId) == msg.sender);\\n        uint256 amount = depositReceipt.pooledTokens(_NFTId);\\n        depositReceipt.burn(_NFTId);\\n        gauge.getReward(address(this), _tokens);\\n        gauge.withdraw(amount);\\n        //AMMToken adheres to ERC20 spec meaning it reverts on failure, no need to check return\\n        //slither-disable-next-line unchecked-transfer\\n        AMMToken.transfer(msg.sender, amount);\\n    }\\n```\\n
Users attempting to withdraw can have their funds stolen
```\\nfunction withdrawFromGauge(uint256 _NFTId, address[] memory _tokens)  public  {\\n    uint256 amount = depositReceipt.pooledTokens(_NFTId);\\n    depositReceipt.burn(_NFTId);\\n    gauge.getReward(address(this), _tokens);\\n    gauge.withdraw(amount);\\n    //AMMToken adheres to ERC20 spec meaning it reverts on failure, no need to check return\\n    //slither-disable-next-line unchecked-transfer\\n    AMMToken.transfer(msg.sender, amount);\\n}\\n```\\n