Skip to content

Commit

Permalink
Review suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 7, 2016
1 parent 4f5a95d commit 057db59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/control-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ We now want to describe the inline assembly language in detail.

.. warning::
Inline assembly is a way to access the Ethereum Virtual Machine
at a low level. This discards and allows you to bypass several safety
at a low level. This discards several important safety
features of Solidity.

Example
Expand Down
12 changes: 6 additions & 6 deletions docs/security-considerations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ and stall those. Please be explicit about such cases in the documentation of you
Sending and Receiving Ether
===========================

- Neither contracts nor "external accounts" are currently able to prevent that someone sends them Ether.
Contracts can react on and reject a regular transfer, but there are ways
to move Ether without creating a message call. One way is to simply "mine to"
the contract address and the second way is using ``selfdestruct(x)``.

- If a contract receives Ether (without a function being called), the fallback function is executed.
If it does not have a fallback function, the Ether will be rejected (by throwing an exception).
During the execution of the fallback function, the contract can only rely
Expand Down Expand Up @@ -134,11 +139,6 @@ Sending and Receiving Ether
means for the recipient to block progress in the sending contract. Again, the best practice here is to use
a :ref:`"withdraw" pattern instead of a "send" pattern <withdrawal_pattern>`.

- Contracts currently cannot prevent that someone sends them Ether.
They can react on and reject a regular transfer, but there are ways
to move Ether without creating a message call. One way is to simply "mine to"
the contract address and the second way is using ``selfdestruct(x)``.

Callstack Depth
===============

Expand Down Expand Up @@ -192,7 +192,7 @@ Now someone tricks you into sending ether to the address of this attack wallet:
}
}

If your wallet had checked ``msg.sender`` for authorization, it would get the address of the attack wallet, instead of the owner address. But by checking tx.origin, it gets the original address that kicked off the transaction, which is still the owner address. The attack wallet instantly drains all your funds.
If your wallet had checked ``msg.sender`` for authorization, it would get the address of the attack wallet, instead of the owner address. But by checking ``tx.origin``, it gets the original address that kicked off the transaction, which is still the owner address. The attack wallet instantly drains all your funds.


Minor Details
Expand Down

0 comments on commit 057db59

Please sign in to comment.