meteor/meteor

accounts-passwordless does not always convert email selector to lowercase

開放

#12,412 建立於 2022年12月29日

 (13 則留言) (0 個反應) (0 位負責人)JavaScript (5,257 個分叉)batch import
Impact:someProject:Accounts:PasswordlessSeverity:productionType:Bugconfirmedgood first issueidle

倉庫指標

星標
 (44,781 顆星)
PR 合併指標
 (平均合併 9天 9小時) (30 天內合併 21 個 PR)

描述

Meteor 2.9.0

I've been noticing the following error during testing with Meteor:

User not found [403]
"Error: User not found [403]
    at Connection._livedata_result (http://localhost:3200/packages/ddp-client.js?hash=12df120d82048869c74b009c3544bf96a2f333dc:1812:23)
    at Connection.onMessage (http://localhost:3200/packages/ddp-client.js?hash=12df120d82048869c74b009c3544bf96a2f333dc:1961:12)
    at http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:193:11
    at Array.forEach (<anonymous>)
    at ClientStream.forEachCallback (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:262:31)
    at socket.onmessage (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:192:14)
    at REventTarget.dispatchEvent (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:482:22)
    at SockJS._dispatchMessage (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:1502:10)
    at SockJS._didMessage (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:1556:16)
    at that.ws.onmessage (http://localhost:3200/packages/socket-stream-client.js?hash=cead8e84bd8ebf243d505fc1bac78ee9d9e6be3d:1683:15)"

Meteor converts all emails to lower case as it can then be easier to match them (i.e. maX@meteor.com is converted to max@meteor.com) - however, for accounts-passwordless, it looks like this is not happening on the selector field which could then cause the query to fail and say that the user is not found.

For example, you can see it on the sign in link:

http://localhost:3200/?loginToken=2726&selector=asdf@Me.com

貢獻者指南