certbot/certbot-apache/certbot_apache
Adrien Ferrand 71ff47daad Implement a consistent realpath function in certbot.compat.filesystem (#7242)
Fixes #7115 

This PR creates a `realpath` method in `filesystem`, whose goal is to replace any call to `os.path.realpath` in Certbot. The reason is that `os.path.realpath` is broken on some versions of Python for Windows. See https://bugs.python.org/issue9949. The function created here works consistently across Linux and Windows.

As for the other forbidden functions in `os` module, our `certbot.compat.os` will raise an exception if its `path.realpath` function is invoked, and using the `os` module from Python is forbidden from the pylint check implemented in our CI.

Every call to `os.path.realpath` is corrected in `certbot` and `certbot-apache` modules.

* Forbid os.path.realpath

* Finish implementation

* Use filesystem.realpath

* Control symlink loops also for Linux

* Add a test for forbidden method

* Import a new object from os.path module

* Use same approach of wrapping than certbot.compat.os

* Correct errors

* Fix dependencies

* Make path module internal
2019-07-18 14:31:39 -07:00
..
augeas_lens Update Augeas lens to fix some Apache configuration parsing issues (#6438) 2018-10-31 09:34:14 -07:00
tests Implement a consistent realpath function in certbot.compat.filesystem (#7242) 2019-07-18 14:31:39 -07:00
__init__.py s/Let's Encrypt/Certbot certbot-apache 2016-04-13 16:36:53 -07:00
apache_util.py [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
centos-options-ssl-apache.conf update Apache ciphersuites (#5383) 2018-01-09 07:46:21 -08:00
configurator.py Implement a consistent realpath function in certbot.compat.filesystem (#7242) 2019-07-18 14:31:39 -07:00
constants.py Gradually increasing HSTS max-age (#5912) 2018-06-21 07:27:19 -07:00
display_ops.py [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
entrypoint.py Implements specific overrides for Fedora 29+ in Apache plugin (#6988) 2019-05-01 03:21:10 +03:00
http_01.py [Windows] Security model for files permissions - STEP 3d (#6968) 2019-07-03 16:20:43 -07:00
obj.py Fix Pylint upgrade issues 2018-05-16 20:37:39 +00:00
options-ssl-apache.conf update Apache ciphersuites (#5383) 2018-01-09 07:46:21 -08:00
override_arch.py Make Apache control script and binary paths configurable on command line (#6238) 2018-08-02 08:17:38 -07:00
override_centos.py Refactor augeas_configurator.py functionality to configurator.py and parser.py accordingly. (#7181) 2019-06-28 08:39:13 -07:00
override_darwin.py Make Apache control script and binary paths configurable on command line (#6238) 2018-08-02 08:17:38 -07:00
override_debian.py Implement a consistent realpath function in certbot.compat.filesystem (#7242) 2019-07-18 14:31:39 -07:00
override_fedora.py Refactor augeas_configurator.py functionality to configurator.py and parser.py accordingly. (#7181) 2019-06-28 08:39:13 -07:00
override_gentoo.py Refactor augeas_configurator.py functionality to configurator.py and parser.py accordingly. (#7181) 2019-06-28 08:39:13 -07:00
override_suse.py fix(apache): s/handle_mods/handle_modules (#6347) 2018-09-06 15:00:20 -07:00
parser.py Refactor augeas_configurator.py functionality to configurator.py and parser.py accordingly. (#7181) 2019-06-28 08:39:13 -07:00