PyPi: Pywbem

CVE-2018-18074

Transitive

Safety vulnerability ID: 38444

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Oct 09, 2018 Updated at Apr 19, 2024
Scan your Python projects for vulnerabilities →

Advisory

Pywbem 0.14.3 updates its dependency 'requests' to v2.20.0 to include a security fix.

Affected package

pywbem

Latest version: 1.7.2

pywbem - A WBEM client

Affected versions

Fixed versions

Vulnerability changelog

--------------

Released: 2020-06-24

This is a beta version of the upcoming version 1.0.0. Pip will only install
this version if explicitly requested, e.g. using any of these commands::

$ pip install pywbem==1.0.0b1
$ pip install --pre pywbem

This version contains all fixes since 0.14.0 and up to pywbem 0.17.2.

**Incompatible changes:**

Because pywbem 1.0.0 is a major change, a number of significant incompatibilites
have been incorporated. The following subsections summarize these changes and provide
details of the changes themselves and the reasons for the changes.

*Summary of incompatible changes:*

The details, alternatives, and reasons for these incompatible changes is shown
below this list.

* Removed Python 2.6 support.

* Migrated pywbem to use the 'requests' Python package for HTTP/HTTPS pywbem
client to WBEM server communication.

* Removed the following deprecated functionality:

- `WBEMConnection` `verify_callback` init parameter.
- `WBEMConnection` `**extra` keyword arguments from operation methods.
- Ordering for `NocaseDict`, `CIMInstanceName`, `CIMInstance` and `CIMClass`
objects.
- `WBEMConnection` properties: `url`, `creds`, `x509`, `ca-certs`,
`no_verification`, and `timeout` setter methods. They are now read-only
- `WBEMConnection` `method_call()` and imethod_call()` methods.
- `WBEMConnection` `operation_recorder` property.
- `CIMInstance` property `property_list` and the same-named init parameter.
- `pywbem.tocimxml()` support for value of `None`.
- `CIMInstance.tomof()` `indent` parameter.
- `pywbem.byname()` internal function.
- `pywbem.tocimobj()` function.
- `wbemcli` command.

* Made the `MOFWBEMConnection` class (support for the MOF compiler) internal.

* Changed exceptions behavior:

- MOF compilation methods of `MOFCompiler` and `FakedWBEMConnection` raises
exceptions based on class `pywbem.MOFCompileError`.
- Some methods of `ValueMapping` to use `pywbem.ModelError`.
- Some methods of `WBEMServer` to raise the new exception `pywbem.ModelError`.
- `WBEMConnection` request method responses added a new exception
`pywbem.HeaderParseError` derived from `pywbem.ParseError`.

* Made all sub-namespaces within the pywbem namespace private, except for
'pywbem.config'.

* Mock WBEM Server (experimental):

- Replaced the `add_method_callback()` method in
`FakedWBEMConnection` with user-defined providers.
- Removed the `conn_lite` init parameter and mode of `FakedWBEMConnection`.
- Changed the logging behavior of the MOF compilation methods of
`FakedWBEMConnection` so that the default is for the caller to display
exceptions rather than the MOF compiler logger.
- Changed the default behavior to ignore `IncludeQualifiers` and
`IncludeClassOrigin` parameters for GetInstance and EnumerateInstances
operations of the mock WBEM server.

*Incompatible change details:*

* Removed Python 2.6 support. The Python Software Foundation stopped supporting
Python 2.6 in October 2013. Since then, many Python packages have continued
releasing versions for Python 2.6, including pywbem. In 2017 and
2018, a number of Python packages have removed support for Python 2.6 and it
has become an increasingly difficult task for pywbem to keep supporting
Python 2.6. For this reason, Python 2.6 support has been removed from pywbem
in its 1.0.0 version.
This allowed eliminating a lot of Python version dependent code,
eliminating the dependency to the unittest2 package, and lifting a number
of restrictions in test code.

* Migrated pywbem to use the 'requests' Python package for all HTTP/HTTPS
communication between the pywbem client and the WBEM server replacing httplib
and different ssl implementations for python 2 and 3. This eliminates
several python 2/3 pywbem differences and simplifies the installation and setup
of pywbem.

This results in the following changes:

- Changed the behavior of the default value `None` for the `ca_certs`
parameter of `WBEMConnection`: Previously, it caused the first existing
directory from a predefined set of directories to be used as the
certificate directory. Now, it causes the certificates provided by the
'certifi' Python package to be used. That package provides the Mozilla
Included CA Certificate List.

- A non-existing path specified for the `ca_certs` parameter of
`WBEMConnection` now raises `IOError`. Previously, the directory or file
was simply skipped (and subsequently, verification failed).

- Removed support for the 'OWLocal' authentication scheme that was supported
for the OpenWBEM server, and the 'Local' authentication scheme that was
supported for the OpenPegasus server. Pywbem now supports only the 'Basic'
authentication scheme.

- Removed support for communicating with WBEM servers using UNIX domain
sockets by specifying a file-based URL. Use the standard http and https
protocols instead.

- The installation of pywbem no longer uses the `pywbem_os_setup.sh/.bat`
scripts because there are no more prerequisite OS-level packages needed
for installing pywbem. If you have automated the pywbem installation,
this step should be removed from your automation.

- Removal of the `WBEMConnection` `verify_callback` method.

* Removed the `verify_callback` parameter of `WBEMConnection`. It was
deprecated in pywbem 0.9.0, and was not supported in Python 3. The 'requests'
package provides the commonly accepted certificate verification within the
package itself. (See issue 1928)

* Removed the `**extra` keyword arguments from `WBEMConnection` operation methods.
Such arguments were passed on to the WBEM server, but they are not needed
because all parameters defined by the CIM-XML protocol are supported as named
arguments to these methods. This would only be incompatible if a WBEM server
supports non-standard parameters or keyword variables were misnamed which
would have been ignored and not used but now results in exceptions. (See
issue 1415)

* Removed the deprecated support for ordering `NocaseDict`, `CIMInstanceName`,
`CIMInstance` and `CIMClass` objects. The ordering of such dictionaries was
never supported with pywbem on Python 3, and for Python 2 it had been
deprecated since pywbem 0.12.0. The user should do any required
ordering. (See issue 1926).

* Removed the deprecated ability to set the following properties of class
`WBEMConnection`: `url`, `creds`, `x509`, `ca-certs`, `no_verification`,
and `timeout`. These properties should not be set after the connection is
defined as the results on the connection are unpreditable.

* Removed the deprecated methods `method_call()` and imethod_call()` and the
deprecated property `operation_recorder` from class `WBEMConnection`. Users
should always use the request methods (ex. GetInstance).

* Removed the deprecated property `property_list` and the same-named init
parameter from class `CIMInstance`. The behavior of this parameter was
undefined and incomplete.

* Removed the deprecated ability to support a value of `None` for
`pywbem.tocimxml()`.

* Removed the deprecated `indent` parameter of `CIMInstance.tomof()`.

* Removed the deprecated internal function `pywbem.byname()`.

* Removed the deprecated function `pywbem.tocimobj()`. The replacement for this
method is to use the function `cimvalue()`.

* Removed the `wbemcli` command that was deprecated in pywbem 0.15.0. The
recommended replacement is the `pywbemcli` command from the 'pywbemtools'
package on Pypi: https://pypi.org/project/pywbemtools/. Some of the reasons
for the removal are: (See issue 1932)

- Wbemcli did not have a command line mode (i.e. a non-interactive mode), but
pywbemcli does.
- The interactive mode of wbemcli was more of a programming environment than
an interactive CLI, and that makes it harder to use than necessary.
Pywbemcli has an interactive mode that uses the same commands as in the
command line mode. If you need an interactive programming prompt e.g. for
demonstrating the pywbem API, use the interactive mode of the python
command, or Python's IDLE.
- Pywbemcli provides more functionality than wbemcli, e.g. server commands,
persistent connections, class find, instance count, or multiple output
formats.

* Made the `MOFWBEMConnection` class internal and removed it from the pywbem
documentation. It has an inconsistent semantics and should not be used by
users. (See issue 2001).

* Exception changes:

* Changed the type of exceptions that are raised by methods of
`pywbem.ValueMapping` for cases where the value-mapped CIM element has
issues, as follows:

- From `TypeError` to `pywbem.ModelError`, if the value-mapped CIM element
is not integer-typed.
- From `ValueError` to `pywbem.ModelError`, if an item of the `ValueMap`
qualifier is not an integer.

The exceptions occur only with model definitions that are invalid and
do not occur in the CIM Schema published by DMTF.

This change is incompatible only for users that handle these exceptions
specifically in their code. (See issue 1429)

* Changed the exception behavior of the MOF compilation methods of the
`MOFCompiler` and `FakedWBEMConnection` classes to no longer raise
`CIMError`, but to raise the following exceptions derived from a new base
class `MOFCompileError`:

- `MOFParseError` MOF parsing errors. This class already existed and was
already used for this purpose.
- `MOFDependencyError`: New class for MOF dependency errors (e.g. superclass
not found).
- `MOFRepositoryError`: New class for errors returned from the target CIM
repository. The `CIMError` exception raised by the CIM repository is
attached to that exception in its attribute `cim_error`.

If you are using these MOF compilation methods, please change your catch
of exceptions accordingly. (See issue 1235)

* Changed the `CIMError` exceptions that were raised by pywbem code in several
`WBEMServer` methods to now raise `ModelError`, for cases where the model
implemented by the server has issues.
(See issue 1423)

* Added a new exception `pywbem.HeaderParseError` derived from
`pywbem.ParseError` that is used to report HTTP header issues in the CIM-XML
response. Previously, `HTTPError` had been used for that purpose, misusing
its integer-typed `status` attribute for the message string. This is actually
a bug fix, but because it changes the exception type, it is also an
incompatible change for users that handle exceptions specifically.
(See issue 2110)

* Made all sub-namespaces within the pywbem namespace private, except for
pywbem.config. Specifically, renamed the following modules by prepending
an underscore character: cim_constants.py, cim_http.py, cim_obj.py,
cim_operations.py, cim_types.py, cim_xml.py, exceptions.py, mof_compiler.py,
moflextab.py, mofparsetab.py, tupleparse.py, tupletree.py.
Using these sub-namespaces had been deprecated in pywbem 0.8.0.

This change is compatible for users that followed the recommendation
to import only the symbols from the pywbem namespace. Users that imported
symbols from these sub-namespace should now import them from the pywbem
namespace. If you miss a symbol in the pywbem namespace, it was likely a
symbol that is not part of the public pywbem API. (See issue 1925)

* Mock WBEM Server (experimental):

* Removed the `add_method_callback()` method and the `methods` property
from the `FakedWBEMConnection` class. This has been replaced by
the user-defined provider concept where the user defines and registers a
subclass to the class MethodProvider which implements the InvokeMethod
responder in that user-defined provider. The 'mock WBEM server' section
of the documentation and module documentation for the MethodProvider
and InstanceWriteProvider document creation of unser-defined providers
(See issue 2062).

* Removed the `conn_lite` init parameter and mode of operation of
`FakedWBEMConnection`. The lite mode turned out too simplistic for mock
testing and of no real value, while adding complexity. Users must include
classes and qualifier declarations. Most mock environments start with
classes and qualifier declarations in any case and the tools to add them
are simple. (See issue 1959)

* Changed the logging behavior of the MOF compilation methods
`FakedWBEMConnection.compile_mof_string()`, `compile_mof_file()` and
`compile_dmtf_schema()` to be able to do no logging, by specifying `None` for
the `log_func` init parameter of `MOFCompiler`. This is now the default.

MOF compile errors no are longer printed to stdout by default. To continue
printing the MOF compile errors to stdout, print the exception in your code.
(See issue 1997)

* Changed the behavior for the IncludeQualifiers and IncludeClassOrigin
parameters on the GetInstance and EnumerateInstances operations of the
mock WBEM server.
The default is now to ignore the provided parameters and never include
either attribute in the returned instances whereas, in previous versions the
provided parameters determined whether they were returned. This behavior
may be changed back to how it was in previous versions by modifying config
variables in the new 'pywbem_mock.config' module.
Reason for the change was that the behavior of these parameters was
inconsistent between versions of :term:`DSP0200` and the new behavior
implements the recommended default behavior. (See issue 2065)

**Deprecations:**

* Deprecated Python 2.7 and 3.4 support in pywbem, that are both beyond their
End-Of-Life date.

* Deprecated the `compile_dmtf_schema()` method in `FakedWBEMConnection` in
favor of a new method `compile_schema_classes()` that does not automatically
download the DMTF schema classes as a search path, but leaves the control over
where the search path schema comes from, to the user.

* Deprecated the `schema_mof_file` property in `DMTFCIMSchema` in favor of
a new property `schema_pragma_file` since this is the file that contains all
of the MOF pragmas defining the locations of the class MOF files in a
set of directories.

**Bug fixes:**

* Dev/Test: Pinned lxml to <4.4.0 because that version removed Python 3.4
support.

* Dev/Test: Pinned pytest to <5.0.0 for Python < 3.5 because that version
requires Python >= 3.5.

* Test: Temporary fix for pytest option `--pythonwarnings` in end2end tests
(issue 1714).

* Test: Fixed AttributeError in end2end assertion functions (Issue 1714)

* Change history: Removed incorrect statement about commenting out
server-specific functionality from the tuple parser from the change history
of pywbem 0.14.0.

* Test: Added and fixed profile definitions for end2end tests. (Issue 1714)

* Fix issue in the Jupyter notebook iterablecimoperations where the
IterQueryInstance example did not correctly processthe return from the
operation. It attempted to itereate the returned object and should have
been iterating the generator property in that object. Documentation of
that example and the example were corrected. (see issue 1741)

* Fix issue in pywbem_mock/_wbemconnection_mock.py with EnumerateInstances that
includes a property list with a property name that differs in case from the
property name in the returned instance. Works in the conn_lite=True mode but
fails in conn_lite=False mode because the test was case insensitive.

* Test: Fixed Appveyor CI setup for UNIX-like environments under Windows
(Issue 1729)

* Windows install: Upgraded version of Win32/64OpenSSL.exe that is downloaded
during installation on native Windows, from 1.1.0j to 1.1.0k. This became
necessary because the maintainer of the Win32OpenSSL project at
https://slproweb.com/products/Win32OpenSSL.html removes the previous version
from the web site whenever a new version is released, causing the pywbem
installation to fail during invocation of pywbem_os_setup.bat on Windows.
Related to that, fixed the way pywbem_os_setup.bat recognizes that the
version does not exist.
(see issue 1754)

* Add Jupyter tutorial for pywbem_mock to table of notebooks in documentation.

* Fix issue with Python 3 and WBEMconnection certificate handling. pywbem
was getting AttributeError: 'SSLContext' object has no attribute 'load_cert'
because incorrect method called. (See issue 1769)

* Fixed that the `OpenAssociatorInstances()` and `OpenReferenceInstances()`
methods of `WBEMConnections` incorrectly supported an `IncludeQualifiers`
parameter, and that the `OpenEnumerateInstances()` method of
`WBEMConnections` incorrectly supported an `IncludeQualifiers` and a
`LocalOnly` parameter, that were never supported as per DSP0200.
Specifying these parameters as `True` or `False` on these methods caused
properly implemented WBEM servers to reject the operation. These parameters
now still exist on these operations but are ignored and are not passed on to
WBEM servers.
The corresponding `Iter...()` methods now also ignore these parameters if the
pull operations are used; they are still passed on if the traditional
operations are used.
(See issue 1780)

* Added test to tests/manual/cim_operations.py specifically to test the iter and
pull operations for the IncludeQualifier and LocalOnly parameters based on
issue 1780.

* Test: Fixed errors on Python 2.6 about unnamed format replacements.

* Fixed incorrect format specifiers in exceptions raised in pywbem_mock.
(See issue 1817)

* Fixed missing suport for the ANY scope in pywbem_mock. (See issue 1820)

* Increased version of WinOpenSSL used on Windows from 1.1.0k to 1.1.0L.

* Fixed the issue that EnumerateInstances did not return instances without
properties unless DeepInheritance was set (see issue 1802).

* Fixed bad formatting on --mock-server option in wbemcli.py.

* Fixed the issue with 'dnf makecache fast' during pywbem_os_setup.sh on Fedora
(See issue 1844)

* Fixed case sensitive class name check in mock support of ModifyInstance
(See issue 1859)

* Docs: Fixed issues in Listener and SubscriptionManager examples
(See issue 1768)

* Test: Fixed args of `WBEMConnection` operation methods in mock unit tests &
function tests.

* Code: Fixed pywbem_mock issue where CreateInstance was not handling the case
sensitivity of property cases if the instance property name case was different than the
class property name case. While not legally incorrect the created instance
looks bad. See issue 1883

* Code: Fixed pywbem_mock issue where ModifyInstance not handling case
sensitivity of property cases if the instance property name case was
different than the class property name case. Modify failed if
the case of property names did not match. Fixed the case test error and
put the class defined proerty name into the modified instance. See issue 1887

* Code: Fix issue with pywbem_mock that allows duplicate instances to be
inserted into the mock repository when mof instances are compiled. Duplicate
instances (CIMInstanceName) will now cause an exception. See issue 1852

* Fix issue in mof compiler where mof instance that duplicates existing instance
path can get lost with no warning. NOTE: This does not happen in the
standalone compiler because it creates a duplicate instance issue 1852
but depending on the implementation of ModifyInstance for the compiler,
it can simply lose the instance. See issue 1894

* Fix issue in pywbem_mock where instances with duplicate paths defined in mof and
put into the mocker repository were originally accepted as separate instances
but fixed to cause an exception in issue 1852, conform to the DMTF spec
definition that requires that the second instance modify the first.
Fix issue in the mof_compiler where the CreateInstance retry logic was
first doing a ModifyInstance and if that failed then trying a DeleteInstance
and CreateInstance. We removed the DeleteInstance/CreateInstance logic and
insured that an exception would occur if the ModifyInstance failed.
See issue 1890

* Fixed that the embedded_object attribute was not copied in CIMProperty.copy().

* Fixed that inconsistent names (between key and object name) were not detected
when setting CIMMethod.parameters from an input dictionary.

* Docs: Fixed errors in description of CIMInstance.update_existing().

* Added dependency to pywin32 package for Windows (used by Jupyter Notebook),
and excluded its version 226 to address issue 1946.

* pywbem_mock display_repository() comment defintion that surrounds comments
in the output was defined as but mof comments are // so changed. (see
issue 1951)

* Fixed that local tests (i.e. TEST_INSTALLED=False) skipped MOF tests if
the mofparsetab or moflextab files did not exist. (See issue 1933)

* Circumvented removal of Python 2.7 in Appveyor's CygWin installation
by manually installing the python2 CygWin package. (See issue 1949)

* Fixed issue with MOFCompiler class where mof_compiler script was not writing
the new classes and instances to the remote repository defined with the -s
parameter. (see issue 1956 )

* Fixed issue with mof_compiler and mof rollback where instances were
not removed when rollback was executed. This was caused by MOFWBEMConnection
code that did not put correct paths on the instances when they were
inserted into the local repository so the rollback delete of the instances
could not identify the instances. (see issue 1158)

* Fixed several install issues with the lxml, flake8, pywin32, pip, setuptools,
and wheel packages on Python 3.8 on Windows. (See issues 1975, 1980).

* Silenced the MOFCompiler class for verbose=False. So far, it still printed
messages for generating the YACC parser table, causing one test to fail,
and others to issue useless prints. (Issue 2004)

* Test: Fixed an error in testing the PLY table version in testcases that caused
the LEX/YACC parser table files to be written to the pywbem installation
when using TEST_INSTALLED. (Related to issue 2004)

* Fixed that the MOFCompiler could be created with handle=None to work against
a local repository. It was documented that way, but failed with
AttributeError. (See issue 1998)

* Fixed the error that the MOF compilation of a class could fail but the
error was not surfaced. This only happened when the MOF compiler was invoked
against a WBEM server, when the class already existed, and when the
ModifyClass operation that was attempted in this case, failed.

* Fixed that the CIM-XML payload in log entries was spread over multiple lines.
The payload is now escaped as a single-line Python string.

* Test: Fixed an error in test_format_random() for the backslash character.
(See issue 2027)

* Test: Added testcases to the cim_xml module, and migrated from unittest to
pytest.

* Fixed a standards compliance issue. DSP0201/203 version 2.4 introduced the
requirement to set the TYPE attribute on KEYVALUE elements. In operation
requests sent to the WBEM server, pywbem now sets the TYPE attribute of the
KEYVALUE element for keybinding values that are specified as CIM data types
(e.g. pywbem.Uint8, string, bool). For keybinding values that are specified
as Python int/float types or as None, pywbem continues not to set the TYPE
attribute on KEYVALUE elements. This is sufficient to be fully standards
compliant because it is always possible for a user to cause the TYPE attribute
to be set. In operation responses received from the WBEM server, pywbem
continues to tolerate an absent TYPE attribute, in order to accomodate WBEM
servers that implement DSP0201/203 before version 2.4. (See issue 2052)

* Documented the limitation that the `CORRELATOR` element introduced in
DSP0201/203 version 2.4 is not supported by pywbem. (related to issue 2053)

* Test: Fixed a bug introduced in 0.14.5 where the manualtest scripts failed
with invalid relative import. (see issue 2039)

* Test: Fixed incorrect coverage reported at the end of the pytest run,
by increasing the minimum version of the coverage package to 4.5.2.
(See pywbemtools issue 547)

* Dev: Fixed installation of Jupyter Notebook on Python 3.4 by defining
the appropriate minimum versions of the ipython package, per Python version.
(See issue 2135)

* Pinned dparse to <0.5.0 on Python 2.7 due to an issue. (See issue 2139)

* Added missing attributes to the test client recorder
(class TestClientRecorder) (see issue 2118).

* Fixed version incompatibilities reported by pip for tox/pluggy,
ipython/prompt-toolkit, and flake8/pyflakes. (See issue 2153)

* Fixed the issue where formatting the timezone name of a pywbem.MinutesFromUTC
object raised NotImplementedError, by adding a tzname() method.
(see issue 2160)

* Pinned mock to <4.0.0 on Python <3.6 due to an install issue when installing
from the source tarball. (see issue 2150).

* Enabled installation using 'setup.py install' from unpacked source distribution
archive, and added install tests for various installation methods including
this one. (see issue 2150).

* Increased minimum version of 'six' from 0.10.0 to 0.12.0 when on Python 3.8
(or higher). (See issue 2150).

* Increased minimum version of 'setuptools' on Python 3.7 from 33.1.1 to 38.4.1
to fix a bug with new format of .pyc files. (See issue 2167).

* Test: Fixed virtualenv related failures during install test.
(See issue 2174)

* Dev: Increased the versions of the base packages 'pip', 'setuptools' and
'wheel' to the content of Ubuntu 18.04 as a minimum, and to the lowest
versions that support a particular Python versions beyond that.
This only affects development of pywbem. (See issue 2174)

* Increased the version of 'PyYAML' from 5.1 to 5.3 on Python 2.7, to pick
up a fix for dealing with Unicode characters above U+FFFF in narrow Python
builds. (See issue 2182)

* Fixed raise error for invalid reference_direction in
WBEMServer.get_central_instances(). (See issue 2187)

* Fixed raise error for missing ports in WBEMListener.__init__().
(See issue 2188)

* Fixed issue where DMTFCIMSchema/build_schema_mof creates the new cim_schema
pragma list in order different than the DMTF defined file. In some rare
cases this could cause an issue because the DMTF carefully ordered the
class pragmas to avoid and issues of dependencies, etc. Note that if only
leaf classes are use there should never be an issue. (See issue 2223)

* Fixed issue in MOF compiler where compile_string() modifies the
default_namespace of the MOF_Compiler handle parameter which is some subclass
of WBEMConnection. This impacts at least the pywbem_mock environment since
compiling MOF into a namespace that is not the connection default_namespace
changes the default_namespace to that defined for the compile_string. This
required extending all subclasses of MOFCompiler.BaseRepository to handle an
optional namespace parameter on CreateClass, ModifyClass, GetClass,
CreateInstance, etc. methods including the implementation in pywbem_mock.
(See issue 2247)

* Removed the incorrect statement about deprecated comparison operators in the
`NocaseDict` class - these operators had already returned errors.

**Enhancements:**

* Changed GetCentralInstances methodology in WBEMServer.get_central_instances()
to be bypassed by default, because (1) WBEM servers do not implement it at
this point, and (2) there are WBEM servers that do not behave gracefully
when unknown CIM methods are invoked. Because WBEM servers are required to
implement one of the other methodologies, this change is not incompatible for
pywbem users.

* Improved the performance for receiving large CIM-XML responses in the
tupleparser by moving type checks for text content in XML into an error
handling path, and by replacing some isinstance() calls with type()
comparison.

* Improved the quality of the information in TypeError exceptions that are raised
due to invalid types passed in WBEMConnection operation arguments. (Issue 1736)

* Docs: Updated the trouble shooting section with an entry that explains
how a user can resolve the installation failure that is caused on Windows
when the Win32OpenSSL project at
https://slproweb.com/products/Win32OpenSSL.html removes the previous version
from their web site when a new version is released.

* Increased versions of the following packages to address security
vulnerabilities:

* requests from 2.19.1 to 2.20.1
* urllib3 from 1.22 to 1.23
* bleach from 2.1.0 to 2.1.4

These packages are only used for development of pywbem.

* Docs: Clarified how the pywbem_os_setup.sh/bat scripts can be downloaded
using a predictable URL, for automated downloads.

* Improved handling of missing WinOpenSSL on Windows by recommending manual
download of next version.

* Test: Added support for running the pywbem tests against an installed version
of pywbem, ignoring the version of pywbem that exists in the respective
directories of the repo work directory. This is useful for testing a
version of pywbem that has been installed as an OS-level package.
(See issue 1803)

* Docs: Improved the section about installing to a native Windows environment
(See issue 1804)

* Improved error messages and error handling in wbemcli and in the pywbem
mock support.

* Removed the use of the 'pbr' package because it caused too many undesirable
side effects. As part of that, removed PKG-FILE and setup.cfg and went back
to a simple setup.py file. (See issues 1875, 1245, 1408, 1410)

* Added support for byte string values in keybindings of CIMInstanceName
method to_wbem_uri(), consistent with other methods.

* Test: Added Python 3.8 to the tested environments. (See issue 1879)

* For the end2end tests, extended the definitions in
`tests/profiles/profiles.yml` by the ability to specify the profile version.
(See issue 1554)

* Clarified that namespace and host will be ignored when the `ResultClass` and
`AssocClass` parameters of association operations are specified using a
`CIMClassName` object. (See issue 1907)

* Added capability to log calls to WBEM server from mof_compile script. AAdds
an option to the cmd line options to enable logging.

* Improved test coverage of function tests by verifying the last_request,
last_raw_request, last_reply, and last_raw_reply attributes of a connection.

* Added SSL related issues to the Troubleshooting section in the
Appendix of the docs, and added the OpenSSL version to the
`pywbem.ConnectionError` exceptions raised due to SSL errors for better
diagnosis. (See issues 1950 and 1966)

* Added 'twine check' when uploading a version to Pypi, in order to get
the README file checked before uploading.

* Clarified the 'x509' parameter of 'WBEMConnection' in that its 'key_file'
item is optional and if omitted, both the private key and the certificate
must be in the file referenced by the 'cert_file' item. Added checks
for the 'x509' parameter.

* Migrated the communication between the pywbem client and WBEM servers to
to use the 'requests' Python package. This greatly cleaned up the code,
made the code common again between Python 2 and Python 3, and removed
any prerequisite OS-level packages, thus simplifying the installation of
pywbem again to what is expected for a pure Python package.

* Added more unit tests for the cim_http.py module and converted it to
pytest. (See issue 1414)

* Added a `request_data` attribute to the `HTTPError` and `CIMError`
exceptions and a `response_data` attribute to the `HTTPError` exception
for storing the CIM-XML request or response, respectively, in order to
provide additional context for the error. The `ParseError` exception and its
subclasses already had `request_data` and `response_data` attributes.
(See issue 1423)

* Added proxy support to the `WBEMConnection` class, by adding a `proxies`
init parameter and attribute, utilizing the proxy support of the requests
package. (see issue 2040)

* Changed the HTTPS support of `pywbem.WBEMListener` from using the deprecated
`ssl.wrap_socket()` function to using the `ssl.SSLContext` class that was
introduced in Python 2.7.9. This causes more secure SSL settings to be used.
On Python versions before 2.7.9, pywbem will continue to use the deprecated
`ssl.wrap_socket()` function. (See issue 2002)

* Add property to pywbem_mock `FakedWBEMConnection` to allow the user to modify
the mocker behavior to forbid the use of the pull operations.
(See issue 2126)

* Refactor pywbem_mock into more consistent components separating the
mock repository from the component that represents a CIMOM. (see issue 2062)

* Refactor pywbem_mock to separate the CIM repository from the class
`FakedWBEMConnection`. This creates a new file _cimrepository.py that
implements a CIM server repository. (See issue 2062)

* Enhance `FakedWBEMConnection` to allow user-defined providers for specific
WBEM request operations. This allows user-defined providers for selected
instance requests (CreateInstance, ModifyInstance, DeleteInstance) and for
the InvokeMethod. Includes the capability to register these providers with
a method `register_provider` in `FakedWBEMConnection`. This also creates
a CIM_Namespace provider to handle the CIM_Namespace class in the interop
namespace. See issue 2062)

* Changed format 'standard' of `CIMInstanceName.to_wbem_uri()` to sort the
keys in the resulting WBEM URI. (See issue 2264)

* Added a new method `FakedWBEMConnection.compile_schema_classes()` that does
not automatically download the DMTF schema classes as a search path, but
leaves the control over where the search path schema comes from, to the user.
See the Deprecations section.

**Cleanup:**

* Test: Removed pinning of distro version on Travis to Ubuntu xenial (16.04)
for Python 3.7, because that is now the default distro version, in order to
pick up a future increase of the default distro version automatically.

* Test: Enabled Python warning suppression for PendingDeprecationWarning
and ResourceWarning (py3 only), and fixed incorrect make variable for that.
(See issue 1720)

* Test: Removed pinning of testfixtures to <6.0.0 due to deprecation issue
announced for Python 3.8, and increased its minimum version from 4.3.3
to 6.9.0.

* Test: Increased minimum version of pytest from 3.3.0 to 4.3.1 because
it fixed an issue that surfaced with pywbem minimum package levels
on Python 3.7.

* Increased minimum version of PyYAML from 3.13 to 5.1 due to deprecation issue
announced for Python 3.8.

* Removed unnecessary code from cim_obj._scalar_value_tomof() that processed
native Python types int, long, float. These types cannot occur in this
function, so no tests could be written that test that code.

* Improved performance when setting WBEMConnection.debug by prettifying the
request and reply XML only when actually accessed. (See issue 1572)

* Modified pywbem_mock to create the instance path of new instances
created by the compiler. Previously, the mocker generated an exception
if the path for a compiler created new instance was not set by the
compiler using the instance alias. That requirement has been removed so
the mock repository will attempt to create the path (which is required
for the mock repository) from properties provided in the new instance.
If any key properties of the class are not in the instance it will generate
an exception. This is backward compatible since the mocker will accept
paths created by the compiler. The incompatibility is that the mocker
tests for the existance of all key properties. (see issue 1958)

* Replaced the yamlordereddictloader package with yamlloader, as it was
deprecated. (See issue 2008)

* Removed pywbem_mock conn_lite mode. (See issue 1959)

* Fixed an error in the CIM-XML creation where the IMETHODRESPONSE element did
not support output parameters. The IMETHODRESPONSE element is not used in the
pywbem client, though.

* Fixed an error in the CIM-XML creation where the IRETURNVALUE element did not
support multiple return objects. The IRETURNVALUE element is not used in the
pywbem client, though.

* Fixed issue where the MOF compiler was using an instance path defined when
the compiler built the instance as the instance alias instead of the
instance path returned by the CreateInstance method. The issue is that
the instance path defined in the compiler may not be complete and the
only correct instance path is the path returned by the CreateInstance.
Mof compiler alias now build with return from CreateInstance and the creation
of the path has been moved from the compiler instanceDeclaration to the
CreateInstance method defined in the compiler repo. For the tests that
means that the path creation is in MOFWBEMConnection.CreateInstance.
(See issue 1911)

* Test: Converted WBEMListener tests from unittest to pytest. (See issue 2179)

**Known issues:**

* See `list of open issues`_.

.. _`list of open issues`: https://github.com/pywbem/pywbem/issues


pywbem 0.17.x
-------------

The changes for this version are part of the change log of version 1.0.0,
because 1.0.0 was created based on version 0.14.0 and the changes for this
version were put into 1.0.0 and then backported.


pywbem 0.16.x
-------------

The changes for this version are part of the change log of version 1.0.0,
because 1.0.0 was created based on version 0.14.0 and the changes for this
version were put into 1.0.0 and then backported.


pywbem 0.15.x
-------------

The changes for this version are part of the change log of version 1.0.0,
because 1.0.0 was created based on version 0.14.0 and the changes for this
version were put into 1.0.0 and then backported.

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

HIGH 7.5

CVSS v3 Details

HIGH 7.5
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
NONE
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
NONE
Availability Availability (A)
NONE

CVSS v2 Details

MEDIUM 5.0
Access Vector (AV)
NETWORK
Access Complexity (AC)
LOW
Authentication (Au)
NONE
Confidentiality Impact (C)
PARTIAL
Integrity Impact (I)
NONE
Availability Impact (A)
NONE