voxpupuli / puppet-openldap

Manage OpenLDAP with Puppet
Apache License 2.0
37 stars 134 forks source link

Relax validation of `openldap_database`'s `suffix` parameter #402

Closed smortex closed 9 months ago

smortex commented 9 months ago

The validation of the suffix parameter assumed conformance with RFC2247, but this is not a requirement and cause trouble to some users.

A full validation of the suffix syntax to check if it conforms to RFC2253 is probably overkill, so for now, we just relax the used regexp to allow valid values which where previously rejected.

Some valid DN syntax are still rejected, as supporting them would require to replace the regexp with a parser. Add them as known-bad examples in the test suite (pending tests).

Fixes #391 Fixes #396

smortex commented 9 months ago

@virus2500 can you please give this a try/review this PR? A "clean" fix is an unreasonable amount of work, but this quick fix should solve your issue :wink:

virus2500 commented 9 months ago

@smortex Just tested it with an running install and an fresh install. Everything is working as expected. Thank you for your work :)

smortex commented 9 months ago

Thanks! I'll ask for review in case somebody spot something wrong and will do a release soon.