-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded access control section from cairo #141
Conversation
@ggrieco-tob : can you take a look at the comments above? @smonicas : can you take a look at the PR? |
@montyly this is ready for another review |
|
||
It is still possible to interact with contracts directly. But from the perspective of the contract, the caller's address will be 0. Since 0 is also the default value for uninitialized storage, it's possible to accidentally construct access control checks that fail open instead of properly restricting access to only the intended users. | ||
* If a contract is called from another L2 contract, [access control should be implemented using `get_caller_address()`](https://www.cairo-lang.org/docs/hello_starknet/user_auth.html#getting-the-caller-address). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we explain why in one sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, please take a look
is there anything blocking this merge? |
@smonicas or @technovision99 : can you take a look at the PR? |
fix typo
lgtm, after regenesis we should link here instead imo: https://docs.starknet.io/documentation/architecture_and_concepts/L1-L2_Communication/messaging-mechanism/ |
@technovision99 let's document that in an issue so we don't forget |
replaced by #338 |
No description provided.