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