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

Disallow octal format in Ipv4 string #83652

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Commits on Mar 30, 2021

  1. Disallow octal format in Ipv4 string

    In its original specification, leading zero in Ipv4 string is interpreted
    as octal literals. So a IP address 0127.0.0.1 actually means 87.0.0.1.
    
    This confusion can lead to many security vulnerabilities. Therefore, in
    [IETF RFC 6943], it suggests to disallow octal/hexadecimal format in Ipv4
    string all together.
    
    Existing implementation already disallows hexadecimal numbers. This commit
    makes Parser reject octal numbers.
    
    Fixes rust-lang#83648.
    
    [IETF RFC 6943]: https://tools.ietf.org/html/rfc6943#section-3.1.1
    xu-cheng committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    974192c View commit details
    Browse the repository at this point in the history