File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -755,7 +755,7 @@ def parse_filter_branch(scanner)
755
755
scanner . scan ( /\s */ )
756
756
if op = scanner . scan ( /<=|>=|!=|:=|=/ )
757
757
scanner . scan ( /\s */ )
758
- if value = scanner . scan ( /(?:[-\w *.+@=,#\$ %&!'\s \xC3 \x80 -\xCA \xAF ]|[^\x00 -\x7F ]|\\ [a-fA-F\d ]{2})+/u )
758
+ if value = scanner . scan ( /(?:[-\[ \] {} \ w *.+@=,#\$ %&!'^~ \s \xC3 \x80 -\xCA \xAF ]|[^\x00 -\x7F ]|\\ [a-fA-F\d ]{2})+/u )
759
759
# 20100313 AZ: Assumes that "(uid=george*)" is the same as
760
760
# "(uid=george* )". The standard doesn't specify, but I can find
761
761
# no examples that suggest otherwise.
Original file line number Diff line number Diff line change 6
6
describe "#parse" do
7
7
context "Given ASCIIs as filter string" do
8
8
let ( :filter_string ) { "(cn=name)" }
9
+
9
10
specify "should generate filter object" do
10
11
expect ( Net ::LDAP ::Filter ::FilterParser . parse ( filter_string ) ) . to be_a Net ::LDAP ::Filter
11
12
end
12
13
end
14
+
13
15
context "Given string including multibyte chars as filter string" do
14
16
let ( :filter_string ) { "(cn=名前)" }
17
+
18
+ specify "should generate filter object" do
19
+ expect ( Net ::LDAP ::Filter ::FilterParser . parse ( filter_string ) ) . to be_a Net ::LDAP ::Filter
20
+ end
21
+ end
22
+
23
+ context 'Given string including special chars allowd to be used in DN as filter string' do
24
+ let ( :filter_string ) { '(cn=[{^something~}])' }
25
+
15
26
specify "should generate filter object" do
16
27
expect ( Net ::LDAP ::Filter ::FilterParser . parse ( filter_string ) ) . to be_a Net ::LDAP ::Filter
17
28
end
You can’t perform that action at this time.
0 commit comments