Skip to content

Nginx: too long parameter, probably missing terminating """ character #22

Description

@ajn142attamu

Describe the bug
Removing the duplicate http directive from waf_maps.conf to address #21 results in new error regarding parameters being too long. Referencing https://stackoverflow.com/questions/33200336/nginx-error-parameter-too-long and line 11 of https://github.com/nginx/nginx/blob/master/src/core/ngx_conf_file.c appears to indicate that lines should be less than 4096 characters, however multiple lines exceed this.

Listing from the latest waf_maps.conf includes lines 101, 102, 111, and 141.

To Reproduce
Steps to reproduce the behavior:

  1. Run nginx -t -c /path/to/waf_maps.conf
  2. See error

Expected behavior
No errors on evaluating configuration.

Error messages/logs
too long parameter, probably missing terminating """ character

Environment (please complete the following information):

  • OS: Ubuntu 24.04.1
  • Python Version: N/a
  • Web Server: Nginx 1.24.0
  • Installation Method: downloaded pre-generated configs

Additional context

Deleting these lines allows evaluation to continue and appears to exhaust the errors in waf_maps.conf. Commenting the lines out is insufficient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions