freeipa/ipaplatform
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
..
base topology: manage ca replication agreements 2015-10-15 14:24:33 +02:00
fedora ipaplatform: Add constants submodule 2015-07-21 17:29:33 +02:00
redhat Handle binascii.Error from base64.b64decode() 2015-10-22 18:34:46 +02:00
rhel DNS: check if DNS package is installed 2015-07-21 17:30:10 +02:00
__init__.py.in Server Upgrade: Verify version and platform 2015-05-04 11:16:26 +00:00
setup.py.in Replace filter() calls with list comprehensions 2015-09-01 11:42:01 +02:00