#51056 Issue 50201 - nsIndexIDListScanLimit accepts any value
Closed by spichugi. Opened by spichugi.
spichugi/389-ds-base i50201  into  master

Download 51056.patch

Bug Description: Setting of nsIndexIDListScanLimit like
'limit=2 limit=3' are detected and logged in error logs.
But the invalid value is successfully applied in the config entry
and the operation itself is successful.
The impact is limited because the index will be used following
idlistscanlimit rather than invalid definition nsIndexIDListScanLimit.

Fix Description: Print the errors to the user when he tries to add
or to modify index config entry with malformed values.
Change tests accordingly.

https://pagure.io/389-ds-base/issue/50201

Reviewed by: ?

There should be some kind of comment explaining how this function changes behavior if err_buf is NULL or not.

There should be some kind of comment explaining how this function changes behavior if err_buf is NULL or not.

Other than this LGTM

The patch looks good to report the error but I miss where the error is detected :(
The ticket mentioned several 'limit' (e.g. limit=2 limit=3), I was expecting a fix in attr_index_parse_idlistsize but the patch does not change it.
Where is it checked ?

The patch looks good to report the error but I miss where the error is detected :(
The ticket mentioned several 'limit' (e.g. limit=2 limit=3), I was expecting a fix in attr_index_parse_idlistsize but the patch does not change it.
Where is it checked ?

It is already checked in https://pagure.io/389-ds-base/blob/master/f/ldap/servers/slapd/back-ldbm/ldbm_attr.c#_514

But it was only reported to errors log. My fix made it so the errors are shown to the user additionally while they do modify/add operations.
And the test checks that now.

Thank you, guys! I've added the comment about the behavior when err_buf is NULL and not.
Merging...

rebased onto 888f0b217b3ac3099ba3ccc5002ef5198ddd664d

Pull-Request has been merged by spichugi

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4109

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata