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

topdown: Fixing nanos int overflow issue for time.* built-in functions #4117

Commits on Dec 9, 2021

  1. topdown: Fixing nanos int overflow issue for time.* built-in functions

    The go Time.UnixNano() function result is undefined for dates that
    cannot fit into an int64 when converted to Unix time in nanoseconds.
    
    Updating built-in functions to return error if date is too low/high.
    
    Fixes: open-policy-agent#4098
    Signed-off-by: Johan Fylling <johan.dev@fylling.se>
    johanfylling committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    fd5327b View commit details
    Browse the repository at this point in the history
  2. Fixup into commit fd5327b (squash before merge)

    Adjusting min allowed time to be '1677-09-21 00:12:43.145224192'.
    
    Signed-off-by: Johan Fylling <johan.dev@fylling.se>
    johanfylling committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    93ee2ac View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Fixed changes requested by @srenatus (squash before merge)

    Making nanosecond overflow error message more concise.
    Updating relevant time.* built-ins to be registered with RegisterBuiltinFunc().
    
    Signed-off-by: Johan Fylling <johan.dev@fylling.se>
    johanfylling committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    90bcaf9 View commit details
    Browse the repository at this point in the history
  2. Fixed changes requested by @srenatus (squash before merge)

    Updating docs for built-in functions.
    
    Signed-off-by: Johan Fylling <johan.dev@fylling.se>
    johanfylling committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    03b1e5c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eaaee97 View commit details
    Browse the repository at this point in the history