Skip to content
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

Update lib.rs 修复require失效不revert的bug #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethan75
Copy link

@ethan75 ethan75 commented May 9, 2023

pub fn require(expr: bool, msg: Q)
where
Q: AsRef,
执行合约的require语句,expr为false时,也不会返回StatusCode::Revert,代码存在漏洞。

pub fn require<Q>(expr: bool, msg: Q)
where
    Q: AsRef<str>,
执行合约的require语句,expr为false时,也不会返回StatusCode::Revert,代码存在漏洞。
@ethan75
Copy link
Author

ethan75 commented May 10, 2023

liquid也需要做相应修改:https://github.com/WeBankBlockchain/liquid/pulls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant