The login handler below passes the request body straight into a MongoDB-style filter.
The bug: MongoDB interprets object values as query operators. An attacker who sends { "username": "admin", "password": { "$ne": null } } as JSON gets a filter that matches any non-null password — logging in as admin without knowing the password.
Your task: fix solve(input) so it only accepts username/password as plain strings — reject (return null) if either field is anything else, like an object carrying a $ne/$gt/$where operator.
Sample tests