updated formatting of Unprotected upgradeable contract so syntax highlighting applies in github wiki

pull/1411/head
PatrickAlphac 2 years ago
parent a008df72bc
commit 844ab69061
  1. 29
      slither/detectors/statements/unprotected_upgradeable.py

@ -65,21 +65,22 @@ class UnprotectedUpgradeable(AbstractDetector):
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Buggy is Initializable{
address payable owner;
function initialize() external initializer{
require(owner == address(0));
owner = msg.sender;
}
function kill() external{
require(msg.sender == owner);
selfdestruct(owner);
}
```solidity
contract Buggy is Initializable{
address payable owner;
function initialize() external initializer{
require(owner == address(0));
owner = msg.sender;
}
function kill() external{
require(msg.sender == owner);
selfdestruct(owner);
}
```
Buggy is an upgradeable contract. Anyone can call initialize on the logic contract, and destruct the contract."""
}
```
Buggy is an upgradeable contract. Anyone can call initialize on the logic contract, and destruct the contract.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (

Loading…
Cancel
Save