+ Patch from Sean Cashin that fixes filter behaviour
Filters would not accept apostrophes, now they do. Thanks Sean Cashin (http://github.com/scashin133)!
This commit is contained in:
parent
7143490850
commit
cd866c0109
2 changed files with 6 additions and 1 deletions
|
@ -694,7 +694,7 @@ class Net::LDAP::Filter
|
|||
scanner.scan(/\s*/)
|
||||
if op = scanner.scan(/<=|>=|!=|:=|=/)
|
||||
scanner.scan(/\s*/)
|
||||
if value = scanner.scan(/(?:[-\w*.+@=,#\$%&!\s]|\\[a-fA-F\d]{2})+/)
|
||||
if value = scanner.scan(/(?:[-\w*.+@=,#\$%&!'\s]|\\[a-fA-F\d]{2})+/)
|
||||
# 20100313 AZ: Assumes that "(uid=george*)" is the same as
|
||||
# "(uid=george* )". The standard doesn't specify, but I can find
|
||||
# no examples that suggest otherwise.
|
||||
|
|
|
@ -44,5 +44,10 @@ describe Net::LDAP::Filter do
|
|||
end
|
||||
end
|
||||
end
|
||||
describe "<- .construct" do
|
||||
it "should accept apostrophes in filters (regression)" do
|
||||
Net::LDAP::Filter.construct("uid=O'Keefe").to_rfc2254.should == "(uid=O'Keefe)"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue