-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending a invalid null type makes the request goroutine panic #2420
Comments
Thanks @louis-paul -- fixed by PR2429. |
Great! Keep up the good work! |
Just received this in rc32 so it looks like it's not completely fixed (or maybe regressed…). Stacktrace:
|
This was referenced Dec 4, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
This bug was found on the v0.9.0-rc27 version, installed from pre-compiled .deb packages on Ubuntu x64. It occurs when the client tries to push points. If a field in the
fields
part of apoint
has an invalid type, such as a JSONnull
value instead of Golang's string zero value (the empty string), the unmarshalling of the request payload fails. This error causes the request goroutine to panic and the server to return a HTTP 500 Internal Server Error code. This may be an invalid request for InfluxDB, but it would be more appropriate for the server to return a 400 Bad Request code and not to crash.Here is the JSON used (via a standard POST request to the write API) to reproduce the bug:
And here is the stack trace from
/var/log/influxdb/influxd.log
after a POST to/write
:The part that crashes the server is
"country":null, "referer":null
, which worked after replacing it by"country":"", "referer":""
.The text was updated successfully, but these errors were encountered: