Timeline for What's the difference between 'msg.sender' and 'tx.origin'?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 18, 2018 at 7:33 | history | edited | eth♦ | CC BY-SA 3.0 |
added 209 characters in body
|
Feb 1, 2018 at 18:41 | comment | added | WBT | Passing on the origin address as a parameter should never be used for security (e.g. "only allow this action if the passed-in address is the contract owner / has certain privileges") because it is easy to spoof: an attacker can just figure out the right address to pass in (e.g. calling owner()) and pass that in as the parameter value. You don't want that giving the caller permissions which should require demonstration that the actor holds the private key associated with the address (as when reading msg.sender directly, not via a passed parameter). | |
Aug 10, 2017 at 6:19 | comment | added | eth♦ | @Curt The feasible way to impersonate msg.sender is to have their private key; without the private key it is computationally infeasible. | |
Aug 3, 2017 at 14:11 | comment | added | Curt | OpenZeppelin's sample code has "address public owner", which means anyone can get the contract's owner's address. Can a wallet (hacker) ever spoof msg.sender to impersonate the owner? | |
Apr 13, 2017 at 13:01 | history | edited | CommunityBot |
replaced http://ethereum.stackexchange.com/ with https://ethereum.stackexchange.com/
|
|
May 29, 2016 at 4:20 | history | edited | eth♦ | CC BY-SA 3.0 |
provide example
|
May 29, 2016 at 3:40 | comment | added | eth♦ | Agree! Code that uses tx.origin will not be "ownable" by a contract multi-sig wallet like Mist. | |
Mar 7, 2016 at 16:28 | vote | accept | dbryson | ||
Mar 7, 2016 at 5:45 | comment | added | Paul S | If you use a wallet like the Mist wallet you will not want to use tx.origin, if I understand this explanation correctly. I would not ever hold substantial ether unless it was in a multi-sig wallet such as the Mist wallet. | |
Mar 7, 2016 at 2:33 | history | answered | eth♦ | CC BY-SA 3.0 |