Univention Bugzilla – Bug 56588
Python2 incompatible template /etc/simplesamlphp/00authsources.php
Last modified: 2023-09-25 09:23:48 CEST
Bug #56074 introduced a Python 2 incompatibility which broke a very important customers whole SAML config, as they were still setting UCR variables for SAML in a Python 2 process. This patch will restore Python 2 compatibility: diff --git saml/univention-saml/conffiles/etc/simplesamlphp/00authsources.php saml/univention-saml/conffiles/etc/simplesamlphp/00authsources.php index dcec19737b..2c81ca07bd 100644 --- saml/univention-saml/conffiles/etc/simplesamlphp/00authsources.php +++ saml/univention-saml/conffiles/etc/simplesamlphp/00authsources.php @@ -79,7 +79,7 @@ print( php_string("uid=sys-idp-user,cn=users,%s" % base), php_string(password), php_string(base), - ), + ) ) @!@ // LDAP authentication source. +++ This bug was initially created as a clone of Bug #56074 +++
Why did the test test/ucs-test/tests/03_ucr/37check-ucr-templates-py3-migration-status.py did not catch this problem? Its in the ignorelist. But why did we put it there, how can we avoid such a problem in the future.
(In reply to Erik Damrose from comment #1) > Why did the test > test/ucs-test/tests/03_ucr/37check-ucr-templates-py3-migration-status.py did > not catch this problem? Its in the ignorelist. But why did we put it there, > how can we avoid such a problem in the future. We put this onto the ignore list as the output is not idempotent: the search attributes weren't sorted and the list/dict sorting differs in Py2/Py3. Easy fix. I will provide a MR.
MR: https://git.knut.univention.de/univention/ucs/-/merge_requests/894
The UCR template has been adjusted to be Py2 compatible and its output is now idempotent. Therefore 03_ucr/37check-ucr-templates-py3-migration-status.py will check it again. univention-saml.yaml e34377d0a733 | Bug #56588: restore Python 2.7 compatibility in UCR template univention-saml (7.0.8-8) e34377d0a733 | Bug #56588: restore Python 2.7 compatibility in UCR template ucs-test (10.0.19-5) e34377d0a733 | Bug #56588: restore Python 2.7 compatibility in UCR template
QA: YAML: OK package build: OK run UCR tests: OK
<https://errata.software-univention.de/#/?erratum=5.0x812>