I couldn't find an appropriate, simple fix of the tx.origin vulnerability, without having to use any modifier, any help is very much appreciated,
thanks,
PS: msg.sender is not what I'm looking for (if another contract calls your contract msg.sender will be the address of the contract and not the address of the user who called the contract)
contract Proxy {
address myAddress;
function callMyContract() public view returns(address) {
MyContract(myAddress).doSomthing();
}
}
contract MyContract {
event Something(address sender);
function doSomthing() public (address) {
emit Something(msg.sender); // Proxy address
emit Something(tx.origin); // User address (the one I need) but vulnerable
}
}