-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: fixed possible reentrancy in Helpers._executeModuleTransaction
- Loading branch information
1 parent
05ee7c3
commit 351956f
Showing
4 changed files
with
66 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,11 @@ import { | |
Events | ||
} from "./DenyHelper.sol"; | ||
import {SignatureDecoder} from "@safe-contracts/common/SignatureDecoder.sol"; | ||
import {ReentrancyGuard} from "@openzeppelin/security/ReentrancyGuard.sol"; | ||
|
||
/// @title Helpers | ||
/// @custom:security-contact [email protected] | ||
abstract contract Helpers is DenyHelper, SignatureDecoder { | ||
abstract contract Helpers is DenyHelper, SignatureDecoder, ReentrancyGuard { | ||
using GnosisSafeMath for uint256; | ||
using Address for address; | ||
|
||
|
@@ -198,6 +199,7 @@ abstract contract Helpers is DenyHelper, SignatureDecoder { | |
/// @param data Data to execute Tx | ||
function _executeModuleTransaction(address safe, bytes memory data) | ||
internal | ||
nonReentrant | ||
{ | ||
ISafe targetSafe = ISafe(safe); | ||
bool result = targetSafe.execTransactionFromModule( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,10 @@ import { | |
ISafe, | ||
ISafeProxy | ||
} from "./Helpers.sol"; | ||
import {ReentrancyGuard} from "@openzeppelin/security/ReentrancyGuard.sol"; | ||
|
||
/// @title Palmera Module | ||
/// @custom:security-contact [email protected] | ||
contract PalmeraModule is Auth, ReentrancyGuard, Helpers { | ||
contract PalmeraModule is Auth, Helpers { | ||
using GnosisSafeMath for uint256; | ||
using Address for address; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
[compiler.solc] | ||
remappings = [ | ||
"forge-std/=lib/forge-std/src/", | ||
"ds-test/=lib/forge-std/lib/ds-test/src/", | ||
"@safe-contracts=lib/safe-contracts/contracts", | ||
"@openzeppelin=lib/openzeppelin-contracts/contracts", | ||
"@solmate=lib/solmate/src", | ||
"solenv=lib/solenv/src", | ||
"@create3=lib/create3-factory/src/" | ||
] |