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

Reject config with unknown directives before committing to it #1897

Commits on Aug 28, 2024

  1. Reject config with unknown directives before committing to it

    Ideally, we want to reject configurations with unknown directives before
    applying any configuration changes that correspond to known directives,
    but current apply-as-you-parse architecture makes that impractical.
    Pending smooth reconfiguration refactoring will make that possible, but
    we can make a step towards that ideal future now.
    
    Rejecting bad configurations before calling configDoConfigure() reduces
    the set of configuration errors that Squid can detect in one execution
    (because configDoConfigure() error-checking code is not reached), but
    that small reduction is a lesser evil compared to running
    configDoConfigure() with a clearly broken config, especially when we are
    going to kill Squid anyway. While many legacy parse_foo() functions do
    apply significant changes before configDoConfigure(), we cannot easily
    prevent that (for now). We can easily prevent configDoConfigure().
    rousskov committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    b20762d View commit details
    Browse the repository at this point in the history