fix acme wrt. security, redundancy, consistency #672
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The #551 PR rewrite/current implementation has several issues:
req_url
copy may point to anything else, but not the intended locationreq
is not checked and thus may overflow thereq_url
bufferis_acme_req()
already takes care of it. It returns the position of the 2nd space of the request-line (seeplen
, RFC 2616, 5.1. The first space gets covered by theGET_ACME_PREFIX
). If the request is not RFC conform, we do not care - ignore it.GET_WELLKNOWN_ACMECHALLANGE_URL_PREFIX_LENGTH
got introduced in the rewrite. The corresponding string is missing. So a corresponding#define
got introduced here.acme.h
or anything else.int send_data_from_ioa_socket_nbh()
is unreliable and does not send the expected HTTP response for whatever reason (I guess, the "return socket" is already closed). So on ubuntu per default a workaround will be used to make sure, that a proper answer gets sent. To forcesend_data_from_ioa_socket_nbh()
usage on ubuntu, one mayexport LIBEV_OK=1
before running./configure ...
.Adding an outdated default header is IMHO not ok. Not sure, whether Citrix maintainers are still onboard, but I do not wanna get sued by anybody, just for re-using my own code. Therefore I added the MIT license header, which should be compatible with the project, does not require a change any other files, but still allows me (and others) to re-use it somewhere else.