Skip to content

Commit

Permalink
Closes #246: Add warning for _msgSender (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeissner authored Mar 24, 2021
1 parent ac82f3a commit a34d45e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/GnosisSafe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract GnosisSafe

using GnosisSafeMath for uint256;

string public constant VERSION = "1.2.0";
string public constant VERSION = "1.3.0";

// keccak256(
// "EIP712Domain(uint256 chainId,address verifyingContract)"
Expand Down
2 changes: 2 additions & 0 deletions contracts/handler/HandlerContext.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ pragma solidity >=0.7.0 <0.9.0;
contract HandlerContext {

// This function does not rely on a trusted forwarder. Use the returned value only to check information against the calling manager.
/// @notice This is only reliable in combination with a FallbackManager that supports this (e.g. Safe contract >=1.3.0).
/// When using this functionality make sure that the linked _manager (aka msg.sender) supports this.
function _msgSender() internal pure returns (address sender) {
// The assembly code is more direct than the Solidity version using `abi.decode`.
assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) }
Expand Down

0 comments on commit a34d45e

Please sign in to comment.