Files
freeipa/ipaserver/plugins
Stanislav Levin 3eb0759a6d schema plugin: Generate stable fingerprint
If some Param defines several values for `exclude` or `include`
attributes then API schema hash will be unstable.

First, these Param's attributes are converted to frozenset
(ipalib/parameters.py), then `ipaserver.plugins.schema` plugin
converts `exclude` and `include` attrs to list. Set/frozenset in
turn, is unordered collection [0]. So, the end order of values is
undefined.
But due to the nature of sets:
> two sets are equal if and only if every element of each set is
contained in the other (each is a subset of the other)

the order of values can be ignored.

Note: other Param's attrs with type frozenset are not affected because
they are not processed by the schema plugin.

[0]: https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset

Fixes: https://pagure.io/freeipa/issue/8955
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2021-08-19 08:44:26 +02:00
..
2010-12-20 17:19:53 -05:00
2017-03-27 19:08:26 +02:00
2021-07-09 09:47:30 -04:00
2021-07-09 09:47:30 -04:00
2020-07-07 10:07:48 -04:00
2018-01-09 07:53:28 +01:00
2019-10-21 18:01:32 +11:00
2019-03-28 00:21:00 +01:00
2020-03-31 09:21:37 +03:00
2020-09-23 14:49:15 +02:00
2021-05-12 10:45:57 -04:00
2018-01-09 07:53:28 +01:00
2020-05-05 10:42:46 +02:00
2021-07-09 09:47:30 -04:00
2019-03-28 00:21:00 +01:00