Univention Bugzilla – Full Text Bug Listing |
Summary: | UCR modules and handlers are double-registered and double-executed | ||
---|---|---|---|
Product: | UCS | Reporter: | Philipp Hahn <hahn> |
Component: | UCR | Assignee: | Jannik Ahlers <ahlers> |
Status: | CLOSED FIXED | QA Contact: | Arvid Requate <requate> |
Severity: | normal | ||
Priority: | P5 | CC: | best, damrose, gohmann, requate |
Version: | UCS 4.3 | Flags: | best:
Patch_Available+
|
Target Milestone: | UCS 4.3-2-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
URL: | https://git.knut.univention.de/univention/ucs/commits/4.3-3?search=bug+%2335239 | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=47260 | ||
What kind of report is it?: | Development Internal | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | Cleanup, Design, Error handling, Troubleshooting | |
Max CVSS v3 score: | |||
Attachments: | Fix hashing to prevent double registration |
Description
Philipp Hahn
2014-07-03 10:46:50 CEST
Created attachment 5988 [details]
Fix hashing to prevent double registration
May breaks if a script and/or module and/or file handler exists with the same name.
*** Bug 39443 has been marked as a duplicate of this bug. *** Still happens with UCS-4.3-1, noticed during QA for Bug #47260 Successful build Package: univention-config-registry Version: 13.0.0-6A~4.3.0.201811121038 Branch: ucs_4.3-0 Scope: errata4.3-2 Successful build Package: ucs-test Version: 8.0.28-224A~4.3.0.201811121052 Branch: ucs_4.3-0 Scope: errata4.3-2 ------------------- univention-config-registry (13.0.0-6) e063d03f8e2d | Bug #35239: Merge branch 'jahlers/35239-ucr-handler-double-registr2' into 4.3-2 c72358089a0c | Bug #35239: fix double registration of ucr modules ucs-test (8.0.28-223) f6db8f23d1c9 | Bug #35239: fix test header e063d03f8e2d | Bug #35239: Merge branch 'jahlers/35239-ucr-handler-double-registr2' into 4.3-2 d2377693ce7b | Bug #35239: test double registration of ucr modules ucs-test (8.0.28-224) 9350e164dd91 | Bug #35239: ucs-test changelog univention-config-registry.yaml f69be95deb78 | Bug #35239: yaml ------------------ I added __hash__, __eq__ and __ne__ functions to the file, script and module confighandler classes. I didn't use __cmp__ methods as suggested by philipp as they will get removed with python 3. > May breaks if a script and/or module and/or file handler exists with the same name. This can, but shouldn't happen: - ConfigHandlerDiverting.to_file stores a path to a config file - ConfigHandlerModule.module stores a module name - ConfigHandlerScript.script stores a path to a script Those should normally never be the same, except if someone uses the config file module to replace variables in a script, and then run it. This should never be neccessary as you can easily access ucr variables in a script anyway. (Has this ever happened? Do we need a test case for this?) Verified: * Code review * Test with updated package * Advisory c7cba1d254 | Advisory: small wording adjustment |