Commit f16a4ff
committed
Add failing test for Net::LDAP#open with nested queries
The nested query should match "user2", but with Net::LDAP#open, we see:
<"user3"> expected but was <"user2">.
And likewise with the outer search:
<["user1", "user2"]> expected but was <["user1", "user3"]>.
What's happening is that the nested query is being sent after the server
has already sent more data to be read for the outer search, so when the
inner search reads, it gets that result. And when it comes time for the
outer search to handle the second results, it gets reads the next result
off the wire, the result of the inner search.
I was also able to get an infinite loop just by *always* performing an
inner search instead of only searching on the first result.1 parent 74fe070 commit f16a4ff
1 file changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
23 | 51 | | |
0 commit comments