Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Long commit message causes postgres insert error #914
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.
changed the title from
Long commit message causes webhook handler to return 400
Long commit message causes postgres insert error
Aug 18, 2015
referenced this issue
Sep 29, 2015
https://github.com/drone/drone/blob/master/store/datastore/ddl/postgres/1_init.sql#L49-L73 seems to be solved on 0.5?
added a commit
May 14, 2017
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.