Challenge #11 – tx.origin Misuse
Difficulty: High
#Security#AccessControl
This contract uses tx.origin for access control, which is insecure.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract MissingFunction {
address public owner;
constructor() {
owner = msg.sender;
}
function setOwner (address _newOwner) public {
owner = _newOwner;
}
💡 Hint: tx.origin can be manipulated. Prefer msg.sender.