[pbs-devel] [PATCH proxmox-backup 3/4] access: ldap check connection on creation and change

Stefan Sterz s.sterz at proxmox.com
Mon Jun 26 14:40:38 CEST 2023


On 26.06.23 14:36, Lukas Wagner wrote:
> 
> 
> On 6/26/23 11:39, Stefan Sterz wrote:
>>   macro_rules! DOMAIN_PART_REGEX {
>>       () => {
>> -        r#"("[^"]+"|[^ ,+"/<>;=#][^,+"/<>;=]*[^ ,+"/<>;=]|[^
>> ,+"/<>;=#])"#
>> +        r#"[^\s,\+=]+=(?:"[^"]+"|(?:\\[,\+=]|[^,\+=])+)"#
>>       };
>>   }
>>   
> 
> I wonder, if we validate any change of the LDAP parameters against the
> actual server anyway, is there
> even any value in validating DNs using a regex?
> 

it could be dropped, i just assumed that having it there would help in
cases of obviously wrong dns and would save us the somewhat expensive
round-trip in such cases.

> If the config is manipulated via the API, a malformed DN will be
> rejected by the server, and in case
> the configuration file is edited directly, the regex also does not
> really help that much. 





More information about the pbs-devel mailing list