-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Webhook crashes when Cache-Control header contains more than the max-age field #527
Comments
Hi - nice catch. Thanks for the detailed bug report - do you have a workaround you can use until we get time to look at this? |
I'm hoping that I can use nginx to overwrite the cache-control header, but haven't had time to look into it yet. |
The fix was reviewed and merged - it will be included in the 1.2.1 release. |
Awesome, thank you to the VerneMQ team for moving fast 👍 Any idea when 1.2.1 might ship? |
Not sure yet - probably in a couple of weeks or so. |
Environment
Expected behavior
When VerneMQ invokes a webhook for
auth_on_register
,auth_on_subscribe
andauth_on_publish
, the result should be cached if the response contains theCache-Control
header. This should work for any common format of Cache-Control.Actual behaviour
The webhook handler currently crashes for headers like
Cache-Control: max-age=300, private
andCache-Control: max-age=300, public
.Output from error log:
This is because the code to parse the header expects everything after
max-age=
to be an integer.Steps to reproduce:
Cache-Control: max-age=300, private
auth_on_register
, pointing to above serverThe text was updated successfully, but these errors were encountered: