Skip to content

No validation for constructor arguments in OLEToken.sol #53

@code423n4

Description

@code423n4

Handle

jayjonah8

Vulnerability details

Impact

In OLEToken.sol the constructor takes in two addresses and two strings and simply sets them in storage without any validation checks.

Proof of Concept

https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/gov/OLEToken.sol#L41

Tools Used

Manual code review

Recommended Mitigation Steps

Add validation checks for addresses in the constructor. Require that they are not the same and the string args should also be unique. The addresses should also not be able to be zero addresses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 (Non-critical)Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisationbugSomething isn't workingsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasons

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions