Skip Menu |

This queue is for tickets about the URI CPAN distribution.

Report information
The Basics
Id: 79523
Status: new
Priority: 0/
Queue: URI

People
Owner: Nobody in particular
Requestors: MARSCHAP [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.60
Fixed in: (no value)



Subject: incorrect parsing of extensions in URI::ldap
HI, according to RFC 4516, extensions in LDAP URIs are allowed to consist only of a NAME, and to leave away the =VALUE part. Unfortunately, the current version of URI::ldap does not reflect this. The attached patch tries to fix the issue by changing the regex that dies the parsing so that it parses the key, but leaves the value undefined. This way occurences of NAME alone and NAME= can be distinguished: * NAME parses to NAME => undef * NAME= parses to NAME => '' Thanks for considering the inclusion of this or a similar change into the next release of URI. Best Peter
Subject: URI-_LDAP.diff
--- URI/_ldap.pm +++ URI/_ldap.pm 2012-09-05 22:10:40.994606469 +0200 @@ -81,7 +81,7 @@ @ext = join(",", @ext) if @ext; my $old = _ldap_elem($self,3, @ext); return $old unless wantarray; - map { uri_unescape($_) } map { /^([^=]+)=(.*)$/ } split(/,/,$old); + map { uri_unescape($_) } map { /^([^=]+)(?:$|=(.*)$)/ } split(/,/,$old); } sub canonical