on it, but is called internally from another function that doesnt have the onlyowner modifier... does the onlyOwner modifier still work?
Yes, it still works. A work around is to separate a public functions into two parts: a public function + a private function. Internally the private function is called. The modifier is put on the public function and would not have an effect on the private function.
Thanks. Im just trying to work out the bSatoshi dividend hack. The hacker called the claim function, which is external with no modifiers. That function simply calls the processAccount function, which is public too but has the onlyOwner modifier. The contract is here: https://etherscan.io/address/0xf8e3c51906210126ff834160fe9c3f41fcd575aa The hackers account is https://etherscan.io/address/0xd0ba00e51225e6af578bc4f2805b5c33bfe97a81 Just trying to figure out how he did it. Again, he called the claim function but not sure how he got around the onlyOwner modifier
Is this an attack? You can do a simple test. onlyOwner might get bypassed when the function is being called internally? Is that your hypothesis?
Обсуждают сегодня