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
I did a mistake and mapped 2 diffrent datatypes in the filter rules id of item (number) and uuid of user(string)
It should at least show the user a 403 error or even better in the backend an exception if you try to add a such rule.
Maybe check if the data type is the same.
To Reproduce
I started it locally for testing
So i did the role mapping the same.
I mapped the Id of an item (number/integer) to a user id ($CURRENT_USER) which was a string.
Now directus tries to parse the uuid of the user to a string wich results in a parse exception.
Errors Shown
atabase | 2022-10-06 22:38:29.222 UTC [145] ERROR: invalid input syntax for type integer: "NaN"
database | 2022-10-06 22:38:29.222 UTC [145] STATEMENT: select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3
directus | 22:38:29 🚨 error select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3 - invalid input syntax for type integer: "NaN"
directus | error: select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3 - invalid input syntax for type integer: "NaN"
directus | at Parser.parseErrorMessage (/directus/node_modules/pg-protocol/dist/parser.js:287:98)
directus | at Parser.handlePacket (/directus/node_modules/pg-protocol/dist/parser.js:126:29)
directus | at Parser.parse (/directus/node_modules/pg-protocol/dist/parser.js:39:38)
directus | at Socket. (/directus/node_modules/pg-protocol/dist/index.js:11:42)
directus | at Socket.emit (node:events:513:28)
directus | at addChunk (node:internal/streams/readable:315:12)
directus | at readableAddChunk (node:internal/streams/readable:289:9)
directus | at Socket.Readable.push (node:internal/streams/readable:228:10)
directus | at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
directus | 22:38:29 ✨ request errored PATCH 500 /items/business/1 31ms
What version of Directus are you using?
9.18.1
What version of Node.js are you using?
16.17.0
What database are you using?
Postgres 13
What browser are you using?
All Browser it is backend
How are you deploying Directus?
Docker and cloud
The text was updated successfully, but these errors were encountered:
Describe the Bug
I did a mistake and mapped 2 diffrent datatypes in the filter rules id of item (number) and uuid of user(string)
It should at least show the user a 403 error or even better in the backend an exception if you try to add a such rule.
Maybe check if the data type is the same.
To Reproduce
I started it locally for testing
So i did the role mapping the same.
I mapped the Id of an item (number/integer) to a user id ($CURRENT_USER) which was a string.
Now directus tries to parse the uuid of the user to a string wich results in a parse exception.
Errors Shown
atabase | 2022-10-06 22:38:29.222 UTC [145] ERROR: invalid input syntax for type integer: "NaN"
database | 2022-10-06 22:38:29.222 UTC [145] STATEMENT: select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3
directus | 22:38:29 🚨 error select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3 - invalid input syntax for type integer: "NaN"
directus | error: select "business"."id", "business"."status" from "business" where (("business"."id" in ($1)) and ("business"."id" = $2)) order by "business"."id" asc limit $3 - invalid input syntax for type integer: "NaN"
directus | at Parser.parseErrorMessage (/directus/node_modules/pg-protocol/dist/parser.js:287:98)
directus | at Parser.handlePacket (/directus/node_modules/pg-protocol/dist/parser.js:126:29)
directus | at Parser.parse (/directus/node_modules/pg-protocol/dist/parser.js:39:38)
directus | at Socket. (/directus/node_modules/pg-protocol/dist/index.js:11:42)
directus | at Socket.emit (node:events:513:28)
directus | at addChunk (node:internal/streams/readable:315:12)
directus | at readableAddChunk (node:internal/streams/readable:289:9)
directus | at Socket.Readable.push (node:internal/streams/readable:228:10)
directus | at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
directus | 22:38:29 ✨ request errored PATCH 500 /items/business/1 31ms
What version of Directus are you using?
9.18.1
What version of Node.js are you using?
16.17.0
What database are you using?
Postgres 13
What browser are you using?
All Browser it is backend
How are you deploying Directus?
Docker and cloud
The text was updated successfully, but these errors were encountered: