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
{"error":"SERVICE_NOT_AVAILABLE","message":"This service appears to not be available."}
with this in err.stack in errorHandler in src/middleware/middleware.js:
{"error":"BAD_REQUEST","message":"Error: key x_\u0000 must not contain null bytes
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:914:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:729:17)
at serializeObject (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/home/node/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at BSON.serialize (/home/node/app/node_modules/bson/lib/bson/bson.js:64:28)"}
Something similar to the #608 solution might be used, e.g.,
if (err.stack && err.stack.includes('must not contain null bytes')) {
...
err.message = 'JSON document must not have a field name containing the U+0000 character.'
The text was updated successfully, but these errors were encountered:
While attempting to re-create this, I found that the change made to fix #846 does a generic try catch which stops JS from writing out the stack trace. In addition the following message is displayed: "A problem occurred while saving the CVE Record, ensure field names in x_ objects do not start with $"
I am going to add "or include a null byte" to the error message and then also implement a test for the $ and the null byte scenarios.
This is similar to the #608 issue.
Sending
to the POST /cve/{id}/cna endpoint results in
with this in err.stack in errorHandler in src/middleware/middleware.js:
Something similar to the #608 solution might be used, e.g.,
The text was updated successfully, but these errors were encountered: