You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
This is between a client and server. The query being used is { query: { $skip: 0, subdomains: {$in: [new RegExp("^.*test.*$","i")] } } }
This is what the server receives, this appears to be what the client sends so the server is definitely not mangling the request.
{ query: { $skip: 0, subdomains: {$in: [{}] } } }
If I like at the websocket connection the data being sent from the client has the {}
I have been able to work around this by passing a string then using a hook on the server end to convert it back into a regular expression.
I am wondering if this is the expected behaviour?
I can provide more detailed examples if required though it'll take me a little while.
I would have tried slack first but it appears to be down.
Expected behavior
I suppose I'd expect it to either send the regexp as is, warn you that you've passed in an invalid value or convert it client side and then convert it back server side.
It is not possible to pass non-string or number types in queries from the client. It has to be converted back into a Regular expression on the server in a before hook.
Steps to reproduce
This is between a client and server. The query being used is
{ query: { $skip: 0, subdomains: {$in: [new RegExp("^.*test.*$","i")] } } }
This is what the server receives, this appears to be what the client sends so the server is definitely not mangling the request.
{ query: { $skip: 0, subdomains: {$in: [{}] } } }
If I like at the websocket connection the data being sent from the client has the {}
I have been able to work around this by passing a string then using a hook on the server end to convert it back into a regular expression.
I am wondering if this is the expected behaviour?
I can provide more detailed examples if required though it'll take me a little while.
I would have tried slack first but it appears to be down.
Expected behavior
I suppose I'd expect it to either send the regexp as is, warn you that you've passed in an invalid value or convert it client side and then convert it back server side.
Actual behavior
It turns the RegExp into a {}
System configuration
Module versions
"@feathersjs/authentication": "^4.3.7",
"@feathersjs/authentication-local": "^4.3.7",
"@feathersjs/authentication-oauth": "^4.3.7",
"@feathersjs/configuration": "^4.3.7",
"@feathersjs/errors": "^4.3.7",
"@feathersjs/express": "^4.3.7",
"@feathersjs/feathers": "^4.3.7",
"@feathersjs/socketio": "^4.3.7",
"@feathersjs/transport-commons": "^4.3.7",
"feathers-authentication-hooks": "^1.0.1",
"feathers-hooks-common": "^4.20.7",
"feathers-mongodb": "^6.0.0",
"feathers-mongodb-fuzzy-search": "^1.1.1",
"feathers-permissions": "https://github.com/Critical-Impact/feathers-permissions.git#master",
"mongodb": "^3.3.3",
NodeJS version:
v10.16.0
Operating System:
Windows 10
Browser Version:
Firefox 70.0.1 (64-bit)
The text was updated successfully, but these errors were encountered: