Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CCT-10: Ensure IPv6-based URLs are properly formatted
* Card ID: CCT-10 Recent changes (e83e637) fixed parsing information from IPv6 URLs. This patch fixes writing these addresses back as strings, mainly into configuration files. Previously, passing in IPv6 URL in e.g. `--baseurl` during registration resulted in broken address in the config file: $ subscription-manager register --baseurl https://[::1]:8443/prefix $ cat /etc/rhsm/rhsm.conf | grep baseurl baseurl=https://::1:8443/prefix After this patch, the square brackets are written when port is specified: $ cat /etc/rhsm/rhsm.conf | grep baseurl baseurl=https://[::1]:8443/prefix Due to the state of the code, it is likely that this problem also exists in other parts. If that is true, it is most likely in less sensitive parts, such as during logging. Looking back, using `ipaddress` stdlib would have been the right way to do this, but it is too late to do that.
- Loading branch information