certbot/acme
Brad Warren 058faeadac
Propagate requirement that ACME responses are UTF-8 (#9001)
I think this fixes https://github.com/certbot/certbot/issues/8968.

The only other calls with `requests` we make in our code outside of our tests that I could find are:

1. [Here](a8a8a39ff1/certbot/certbot/_internal/eff.py (L91)) where we assume the response is JSON and I think [requests behavior](db575eeedc/requests/models.py (L891-L896)) is sane.
2. [Here](a8a8a39ff1/certbot/certbot/ocsp.py (L190)) where we know the response contains binary data.

I think this is a pretty minor change because we were already assuming the response was UTF-8 in the code here when logging it which I think is a valid assumption because the spec says that [all content should be UTF-8 encoded](https://datatracker.ietf.org/doc/html/rfc8555#section-5).

I added the check for the `Accept` header due to the text [here](https://datatracker.ietf.org/doc/html/rfc8555#section-7.4.2) saying that it can be used to request the certificate in an alternate format such as DER. We currently set the Accept header in our own ACMEv1 client code before downloading the DER certificate, but this isn't required according to [the closest thing I think we have to an ACMEv1 spec](f1894f8d1d/docs/acme-divergences-v1.md (section-742)) so I left the content type check with a comment that it can be removed in the future.

* Revert "add chardet dep (#8965)"

This reverts commit 1129d850d3.

* set response.encoding in acme

* more docs
2021-08-23 10:57:34 -07:00
..
acme Propagate requirement that ACME responses are UTF-8 (#9001) 2021-08-23 10:57:34 -07:00
docs Fix Sphinx manpage Building (#8646) 2021-02-09 11:29:31 +01:00
examples remove outdated example code (#8984) 2021-08-12 14:04:22 -07:00
tests acme.standalone: expose original socket.error 2021-06-22 09:24:53 +10:00
LICENSE.txt Update Copyright notice in subpackages LICENSE. 2015-10-04 10:10:41 +00:00
MANIFEST.in Refactor tests out of packaged module for acme plugin (#7600) 2019-11-26 15:25:41 -08:00
pytest.ini Fixes #6085. (#6091) 2018-06-12 17:31:22 -07:00
README.rst Fix ACME module description 2015-10-21 17:06:35 -07:00
readthedocs.org.requirements.txt Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544) 2019-11-25 14:28:05 -08:00
setup.cfg Make wheel universal 2016-01-21 10:11:23 +01:00
setup.py Propagate requirement that ACME responses are UTF-8 (#9001) 2021-08-23 10:57:34 -07:00

ACME protocol implementation in Python