Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include statement lacks whitespace before path #38

Closed
SignalWhisperer opened this issue Aug 2, 2023 · 0 comments · Fixed by #47
Closed

Include statement lacks whitespace before path #38

SignalWhisperer opened this issue Aug 2, 2023 · 0 comments · Fixed by #47
Milestone

Comments

@SignalWhisperer
Copy link

In the conf_parse.peg file, there's the following:

%% An include is a line that begins with 'include' and something.
include <- ws* "include" ws* included_file_or_dir comment? %{
    [_, _Include, _, Included, _] = Node,
    {include, Included}
%};

I think the ws* between "include" and included_file_or_dir might be incorrect as that also allows no whitespace. This would allow includehelloworld to be valid and that likely should be an error instead. It should be ws+ instead of ws*.

I have tested using RabbitMQ (which uses version 3.1.0 of cuttlefish) and confirmed it tries to load the file helloworld when I place includehelloworld in the configuration file.

I expect it to error out and only accept include helloworld, with at least one whitespace mandatory.


I understand how widespread this "misuse" could be (although I did not perform any meaningful search to that matter), and I understand if there is a decision to not fix it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants