certbot/letsencrypt-auto-source
Adrien Ferrand 78cf8ec4de Protect certbot-auto against automated downgrades (#6448)
With current code, the certbot-auto self-upgrade process can make it actually to downgrade itself, because the comparison done is an equality test between local certbot-auto version and the remote one. This is a flaw for attackers, that could make certbot-auto break itself by falsely advertising it about an old version as the latest one available.

A function is added to make a more advanced comparison between version. Certbot-auto will upgrade itself only if the local version is strictly inferior to the latest one available. For instance, a version 0.28.0 will not upgrade itself if the latest one available on internet is 0.27.1. Similarly, non-official versions like 0.28.0.dev0 will never trigger a self-upgrade, to help development workflows.

This implementation relies only on the Python distribution installed by certbot-auto (supporting 2.7+) and basic shell operations, to be compatible with any UNIX-based system.

* Check version with protection again downgrade

* Create a stable version of letsencrypt-auto to use correctly self-upgrade functionality

* Update letsencrypt-auto-source/letsencrypt-auto.template
2018-11-19 14:28:59 -08:00
..
pieces [Windows|Unix] Rewrite bash scripts for tests into python (#6435) 2018-11-07 17:16:16 -08:00
tests Protect certbot-auto against automated downgrades (#6448) 2018-11-19 14:28:59 -08:00
build.py Pin dependency versions when using tools/venv.sh (#4629) 2017-05-11 10:06:05 -07:00
certbot-auto.asc Release 0.28.0 2018-11-07 13:22:57 -08:00
Dockerfile.centos6 Explicitly add six as a dependency in letsencrypt-auto-source dockerfiles (#5808) 2018-03-29 15:34:38 -07:00
Dockerfile.precise Explicitly add six as a dependency in letsencrypt-auto-source dockerfiles (#5808) 2018-03-29 15:34:38 -07:00
Dockerfile.trusty Explicitly add six as a dependency in letsencrypt-auto-source dockerfiles (#5808) 2018-03-29 15:34:38 -07:00
Dockerfile.wheezy Explicitly add six as a dependency in letsencrypt-auto-source dockerfiles (#5808) 2018-03-29 15:34:38 -07:00
letsencrypt-auto Protect certbot-auto against automated downgrades (#6448) 2018-11-19 14:28:59 -08:00
letsencrypt-auto.sig Release 0.28.0 2018-11-07 13:22:57 -08:00
letsencrypt-auto.template Protect certbot-auto against automated downgrades (#6448) 2018-11-19 14:28:59 -08:00
version.py Cleanup test farm tests and add test_sdists (#4089) 2017-01-30 19:37:23 -08:00