freeipa/ipaplatform/redhat
Petr Viktorin eab334dde8 Handle binascii.Error from base64.b64decode()
In Python 3, the base64.b64decode function raises binascii.Error (a ValueError
subclass) when it finds incorrect padding. In Python 2 it raises TypeError.

Callers should usually handle ValueError; unless they are specifically
concerned with handling base64 padding issues).

In some cases, callers should handle ValueError:
- ipalib.pkcs10 (get_friendlyname, load_certificate_request): callers should
  handle ValueError
- ipalib.x509 (load_certificate*, get_*): callers should handle ValueError

In other cases ValueError is handled:
- ipalib.parameters
- ipapython.ssh
- ipalib.rpc (json_decode_binary - callers already expect ValueError)
- ipaserver.install.ldapupdate

Elsewhere no error handling is done, because values come from trusted
sources, or are pre-validated:
- vault plugin
- ipaserver.install.cainstance
- ipaserver.install.certs
- ipaserver.install.ipa_otptoken_import

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-10-22 18:34:46 +02:00
..
__init__.py Split off generic Red Hat-like platform code from Fedora platform code 2014-10-09 15:37:24 +02:00
authconfig.py do not overwrite files with local users/groups when restoring authconfig 2015-10-02 12:45:26 +02:00
constants.py ipaplatform: Add constants submodule 2015-07-21 17:29:33 +02:00
paths.py DNSSEC: platform paths and services 2014-10-21 12:23:03 +02:00
services.py Fix: use DS socket check only for upgrade 2015-05-26 11:30:15 +00:00
tasks.py Handle binascii.Error from base64.b64decode() 2015-10-22 18:34:46 +02:00