Skip to content

Bug Dove - query returns all data if there is a key that is not present in model #2581

@xbubus

Description

@xbubus

Steps to reproduce

Run the same service on Feathers v4 and Feathers v5.0.0-pre.17

GET {{backendURL}}/admin/users?login=gugu.123@gmail.com

returns on both feathers v4 and v5 correct:

[
    {
        "name": "asdf1234",
        "email": "gugu.123@gmail.com",
        "login": "gugu.123@gmail.com",
        "preferences": {
            "locale": "pl-PL",
            "timezone": "Europe/London"
        },
        "createdAt": "2022-03-15T09:15:03.570Z",
        "id": "62305917fcd48aaf2ecf6723"
    }
]
GET {{backendURL}}/admin/users?asdfgh=lololo  

(key asdfgh does not exist in model)
reutnrs empty list on v4:

[]

returns list with all users on v5.0.0-pre.17

[
    {
        "name": "asdf1234",
        "email": "gugu.123@gmail.com",
        "login": "gugu.123@gmail.com",
        "preferences": {
            "locale": "pl-PL",
            "timezone": "Europe/London"
        },
        "createdAt": "2022-03-15T09:15:03.570Z",
        "id": "62305917fcd48aaf2ecf6723"
    },
    {
        "name": "baba",
        "email": "baba.123@gmail.com",
        "login": "baba.123@gmail.com",
        "preferences": {
            "locale": "en-GB",
            "timezone": "Europe/London"
        },
        "createdAt": "2022-03-15T09:14:45.350Z",
        "id": "62305905fcd48aaf2ecf671e"
    },
    {
        "name": "xxxx",
        "email": "xxxx@gmail.com",
        "preferences": {
            "locale": "en-GB",
            "timezone": "Europe/London"
        },
        "login": "xxxx@gmail.com",
        "createdAt": "2021-09-22T09:37:45.260Z",
        "lastLoginAttempt": "2022-03-15T09:27:08.577Z",
        "loginAttempts": 0,
        "id": "614af9693af92a3bc474bcd3"
    }
]

Expected behaviour

In my opinion it should reutrn allways empty list if query does not match.

Can you tell me if it is bug or just logic of queries will change in official v5 release?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions