Bug 46020 - Invalid values are simply ignored and don't raise an error
Invalid values are simply ignored and don't raise an error
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-12 15:33 CET by Florian Best
Modified: 2020-06-22 11:13 CEST (History)
0 users

See Also:
What kind of report is it?: Feature Request
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): API change
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2018-01-12 15:33:50 CET
When I create an object and give one invalid value for a multivalue property that invalid values is simply ignored and the command succeeds.

root@master120:~# udm users/user create --position cn=users,dc=dev,dc=local --set username=zfspaej32b --set firstname=xxri1myaop --set lastname=hdunguux3i --append sambaPrivileges=SeMachineAccountPrivilege --append sambaPrivileges=foobar --set password=univention
E: Invalid Syntax: sambaPrivileges: 
Object created: uid=zfspaej32b,cn=users,dc=dev,dc=local
root@master120:~# echo $?
0
root@master120:~# univention-ldapsearch -b uid=zfspaej32b,cn=users,dc=dev,dc=local -LLL univentionSambaPrivilegeList
dn: uid=zfspaej32b,cn=users,dc=dev,dc=local
univentionSambaPrivilegeList: SeMachineAccountPrivilege

I think it would be better to not create the object in that case or at least change the exit code?
Comment 1 Florian Best univentionstaff 2018-01-12 15:36:09 CET
If there is only one (invalid) value given the command fails:

root@master120:~# udm users/user create --position cn=users,dc=dev,dc=local --set username=zfspaej32b --set firstname=xxri1myaop --set lastname=hdunguux3i --append sambaPrivileges=foobar --set password=univention
E: Invalid Syntax: sambaPrivileges: 
root@master120:~# echo $?
3

If one valid value is part of the list, it ist just ignored.