-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Long commit message causes postgres insert error #914
Comments
https://github.com/drone/drone/blob/master/store/datastore/ddl/postgres/1_init.sql#L49-L73 seems to be solved on 0.5? |
Always use |
I think putting limits on column size is a good thing. We don't want to accept a hook with a 1GB commit message for example. |
The kind of validation you are talking about now should probably be done before parsing a request using maximum "request" size check while or before reading.. I guess having the database do some checks as well isn't too bad, I see that you also truncate the message if it's too long.. You could easily multiply your current limits by 100 and still be relatively safe though. |
The postgres schema for commits uses VARCHAR(255) for the message. If the commit message exceeds this length, then an error occurs trying to commit the commit to the DB.
By the way, the error handling in the hook handler leaves a lot to be desired. A lot of these 400s really should be 500s, and all of them discard the error string instead of logging or returning it, leaving us guessing as to the cause.
The text was updated successfully, but these errors were encountered: