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

nginx: on encountering lua directives, produce a better warning #9475

Merged
merged 7 commits into from
Nov 30, 2022

Conversation

alexzorin
Copy link
Collaborator

See #9066.


The code is a little bit layer violating but it seems a bit tricky to do this from configurator.py, given that we are swallowing the parsing errors.

The output becomes is as below. It's unfortunate that the warning is printed twice, once on presenting the challenge response, and one on cleaning it up. But: this already happens on master, the situation is fairly rare and still achieves a big improvement with telling the user what's wrong.

image

The difference compared to master is:

image

@ohemorange
Copy link
Contributor

Still need to take a closer look, but given how sticky this problem has been in the past I like the general approach. I'm not overly familiar with lua, but looking at the documentation seems to suggest there are a few other options that might involve lua code; probably theoretically *_by_lua should actually parse fine since the argument will be in a string, but just to make sure, it would be nice to have a test to check.

Copy link
Contributor

@ohemorange ohemorange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, helpful solution to get a better error message out there, thanks!

@ohemorange
Copy link
Contributor

Haven't merged it because I wasn't sure if you wanted to add a changelog entry.

@alexzorin alexzorin merged commit c178fa8 into master Nov 30, 2022
@alexzorin alexzorin deleted the nginx-better-lua-error branch November 30, 2022 01:03
@alexzorin
Copy link
Collaborator Author

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants