-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
reverseproxy: use pointer when loading modules and remove LazyCertPool #6307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thank you. I checked, and those are the only ones.
How were you testing it? What did we miss in our tests? |
I was just fixing one of the deprecation warnings and then this one happened, you know, I think there are no tests for these. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be using pointer receivers on the methods instead, shouldn't they? Otherwise the module will just get loaded onto a copy of the struct? (You're passing in a pointer to a copy of the struct)
Good catch though!!
From the comment,
I think some of the method require more drastic changes actually, since some of validation called |
Not sure I follow 🤔 |
This brings my attention to a critical point
If the method |
Why is decoding the RawMessage needed more than once though? It's a static value. |
The module in question here is the However, I took a look at the code paths now. The lazy certpool doesn't work as I imagined. The method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Thank you so much. We can revisit the LazyCertPool later if needed.
While testing the latest beta, I encountered a deprecation
The 'tls_trusted_ca_certs' field is deprecated. Use the 'tls_trust_pool' field instead.
When I made the necessary changes and reloaded, caddy panicked.This is introduced in 6065.
When fixing this issue, I found it's the same problem the the CA provider modules, introduced in 5784.
@mohammed90 @armadi1809 Can you check if there are more instances where value is used instead of pointer when loading modules in your commits?