Bug 40243 - sync jpegPhoto attribute (base64 encode jpegPhoto before sync to ucs)
sync jpegPhoto attribute (base64 encode jpegPhoto before sync to ucs)
Status: RESOLVED DUPLICATE of bug 50033
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Julia Bremer
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-14 10:19 CET by Janis Meybohm
Modified: 2021-03-02 21:47 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2015121121000211
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (741 bytes, patch)
2015-12-16 17:24 CET, Florian Best
Details | Diff
patch (886 bytes, patch)
2015-12-16 18:04 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2015-12-14 10:19:45 CET
2015121121000211

S4-Connector tries to encode jpegPhoto (and fails):

10.12.2015 13:48:58,702 LDAP        (WARNING): encode_s4_object: encode attrib jpegPhoto failed, ignored!

This probably prevents users from defining a mapping for jpegPhoto as the attribute will always be ignored (<- guess).
Comment 1 Felix Botner univentionstaff 2015-12-16 17:03:30 CET
The Problem is that UDM wants a base64 encoded jpeg, but in s4 the the jpegPhoto is binary data.

16.12.2015 16:56:08,834 LDAP        (PROCESS): sync to ucs:   [          user] [    modify] uid=home1,cn=users,dc=w2k12,dc=test
16.12.2015 16:56:08,921 LDAP        (ERROR  ): InvalidSyntax: Picture of the user (JPEG format): Value must be Base64 encoded jpeg. (uid=home1,cn=users,dc=w2k12,dc=test)


sync_to_ucs -> base64.b64encode(jpegPhoto)

We probably need special post_con_modify_functions and post_ucs_modify_functions for the jpegPhoto attribute.
Comment 2 Florian Best univentionstaff 2015-12-16 17:24:39 CET
Created attachment 7378 [details]
patch

It would be easier to just change the syntax class to allow not-already-base64-encoded-jpeg-data. So it works in UMC plus in the connector.

Felix, Can you please test my attached patch?
Comment 3 Florian Best univentionstaff 2015-12-16 18:04:02 CET
Created attachment 7379 [details]
patch

As discussed: another patch as UMC gives data as unicode objects to the syntax class.
Comment 4 Stefan Gohmann univentionstaff 2019-01-03 07:16:52 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 5 Arvid Requate univentionstaff 2019-07-23 17:06:01 CEST
Still todo.
Comment 6 Florian Best univentionstaff 2019-10-16 12:09:52 CEST
commit 757f3158e0c9641fd83f7a4e6284951796110a78 introduced a fuzzy:
+++ b/management/univention-directory-manager-modules/modules/univention/admin/handlers/nagios/de.po
-msgid "https://docs.software-univention.de/manual-4.4.html#nagios:Configuration_of_the_Nagios_monitoring"
+msgid "https://docs.software-univention.de/manual-4.4.html#nagios:Configuration_of_the_Nagios_monitoringConfiguration_of_the_Nagios_monitoring"
Comment 7 Florian Best univentionstaff 2021-03-02 21:47:02 CET
Julia already fixed this in git:757f3158e0c9641fd83f7a4e6284951796110a78 ?!

*** This bug has been marked as a duplicate of bug 50033 ***