[SERVER-10072] Can't find document by {"password":"password"} Created: 01/Jul/13  Updated: 13/Jul/13  Resolved: 01/Jul/13

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.4.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Evgeniy Tuboltsev Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

debian 7 x64


Operating System: ALL
Participants:

 Description   

Db can't find document, see results from console please:

> db.ForbiddenPassword.find({"password":/password/});
{ "_id" : ObjectId("51d1cb55e533dd5b47f9e33d"), "password" : "password9" }
{ "_id" : ObjectId("51d1cb54e533dd5b47f9c7b3"), "password" : "password" }
{ "_id" : ObjectId("51d1cb54e533dd5b47f9ca1f"), "password" : "password1" }
{ "_id" : ObjectId("51d1cb54e533dd5b47f9d677"), "password" : "passwords" }
{ "_id" : ObjectId("51d1cb54e533dd5b47f9dc55"), "password" : "password2" }
> db.ForbiddenPassword.find({"password":"password"});
> 
(nothing found)



 Comments   
Comment by Evgeniy Tuboltsev [ 01/Jul/13 ]

Excuse me please, problem was in invisible BOM symbol...
Please remove this issue.

Comment by Daniel Pasette (Inactive) [ 01/Jul/13 ]

I would expect the second result to be found with and without the regular expression.

{ "_id" : ObjectId("51d1cb54e533dd5b47f9c7b3"), "password" : "password" }

Can you post the exact steps you use to reproduce this?

Generated at Thu Feb 08 03:22:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.