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

RetentionConfig: restrict days to uint16 #824

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Commits on Oct 10, 2024

  1. RetentionConfig: restrict days to uint16

    As discussed in #821, allowing huge retention values - as the type
    uint64 allows - may result in overflows. Especially Go's time.AddDate()
    method silently overflows for huge values, resulting in unexpected
    comparison times.
    
    > $ ./icingadb --config <(echo 'retention: {history-days: -1}')
    > can't parse YAML file /proc/self/fd/11: cannot unmarshal -1 into Go value of type uint16 ( overflow )
    >
    > $ ./icingadb --config <(echo 'retention: {history-days: 100000}')
    > can't parse YAML file /proc/self/fd/11: cannot unmarshal 100000 into Go value of type uint16 ( overflow )
    oxzi committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    0eb1ad8 View commit details
    Browse the repository at this point in the history