summaryrefslogtreecommitdiff
path: root/generator_templates
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-02-21 13:42:11 +0000
committerSean McGivern <sean@gitlab.com>2018-02-22 12:26:23 +0000
commitcdf3ae04f84abe039b79ab31192bb7c462bf7ce5 (patch)
tree6631529a0cc5f189d25928551d2b20137dc5f3ad /generator_templates
parent9ff91bc481683e3619e0745b03161a12a5afd497 (diff)
downloadgitlab-ce-cdf3ae04f84abe039b79ab31192bb7c462bf7ce5.tar.gz
Fix 500 error when diff context line has broken encoding42332-actionview-template-error-366-524-out-of-range
Rugged sometimes chops a context line in between bytes, resulting in the context line having an invalid encoding: https://github.com/libgit2/rugged/issues/716 When that happens, we will try to detect the encoding for the diff, and sometimes we'll get it wrong. If that difference in encoding results in a difference in string lengths between the diff and the underlying blobs, we'd fail to highlight any inline diffs, and return a 500 status to the user. As we're using the underlying blobs, the encoding is 'correct' anyway, so if the string range is invalid, we can just discard the inline diff highlighting. We still report to Sentry to ensure that we can investigate further in future.
Diffstat (limited to 'generator_templates')
0 files changed, 0 insertions, 0 deletions