Bug 47092 - [4.2] ucs-school-user-import does not trim leading/trailing whitespaces
Summary: [4.2] ucs-school-user-import does not trim leading/trailing whitespaces
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: Import scripts
Version: UCS@school 4.2
Hardware: Other other
: P5 normal
Target Milestone: UCS@school 4.2 v10
Assignee: Daniel Tröder
QA Contact: Ole Schwiegert
URL:
Keywords:
Depends on: 46970
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-28 12:07 CEST by Daniel Tröder
Modified: 2018-07-04 18:07 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 39720
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2018-05-28 12:07:00 CEST
Merge back to 4.2.

+++ This bug was initially created as a clone of Bug #46970 +++

A customer imported some users a while ago, e.g.:

dn: uid=mary.gomme,cn=schueler,cn=users,ou=999,dc=edu,dc=example,dc=org
sn: Gommer
givenName: Mary Fairfax

For the second import run, a trailing whitespace was unintentionally added to the lastname, resulting in "Gommer " (OpenLDAP will save this in base64, then):

dn: uid=mary.gomme,cn=schueler,cn=users,ou=999,dc=edu,dc=example,dc=org
sn:: R29tbWVyIA==
givenName: Mary Fairfax

This is especially nasty if this hits the recordUID, because then a completely new user will be created and the old one will be deleted.

IMHO ucs-school-user-import should trim leading and trailing whitespaces for all (most?) attributes. Maybe we could add this as a hook, so customers can deactivate it if needed?
Comment 1 Daniel Tröder univentionstaff 2018-06-04 09:23:58 CEST
[4.2] 971dc780 Bug #47092: strip leading/trailing whitespace from CSV input
[4.2] 08c8e894 Bug #47092: add deepcopy operation support to all ucsschool.lib objects
[4.2] f0752824 Bug #47092: use deepcopy in import
[4.2] 83e5d7f0 Bug #46970: changelog
[4.2] d3860bab Bug #47092: advisories


ucs-school-lib (10.0.2-15)
ucs-school-import (15.0.3-40)
ucs-test-ucsschool (4.0.4-93)
Comment 2 Ole Schwiegert univentionstaff 2018-06-05 13:23:40 CEST
whitespaces were trimmed upon import
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2018-07-04 18:07:51 CEST
UCS@school 4.2 v10 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.2v10-de.html

If this error occurs again, please clone this bug.