summaryrefslogtreecommitdiff
path: root/lib/gitlab/encoding_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable frozen string for lib/gitlab/*.rbgfyoung2018-10-221-0/+2
|
* Fix Error 500s due to encoding issues when Wiki hooks fireStan Hu2018-08-291-1/+1
| | | | | | | | | | | | Saved Wiki content goes through the GitalyClient::WikiService, which calls StringIO#set_encoding on the input stream. The problem is that this call mutates the encoding of the given string object to ASCII-88BIT, which causes problems for models expecting the data to still be in UTF-8. Freezing the input disables this behavior: https://github.com/ruby/ruby/blob/v2_4_4/ext/stringio/stringio.c#L1583 Closes #50590
* Resolve Naming/UncommunicativeMethodLin Jen-Shin2018-07-091-5/+5
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
|
* Fix EncodingHelper#clean blowing up on UTF-16BE stringsfix/encoding-helper-clean-blowing-up-on-utf-16beAhmad Sherif2018-03-221-1/+1
| | | | Closes gitaly#1101
* Return a warning string if we try to encode to unsupported encodingAhmad Sherif2018-02-091-3/+3
| | | | Fixes gitlab-development-kit#321
* Fix a bug where charlock_holmes was used needlessly to encode strings41677-branch-name-omitted-due-to-bad-utf-8-conversion-by-gitaly-ref-handlerAlejandro Rodríguez2018-01-041-10/+16
|
* Move encoding methods to the more general EncodingHelpergitaly-encoding-helpersAlejandro Rodríguez2017-12-281-0/+10
|
* Fix encoding bugs in Gitlab::Git::UserJacob Vosmaer (GitLab)2017-11-231-0/+4
|
* Avoind unnecesary `force_encoding` operationsAlejandro Rodríguez2017-10-181-2/+5
| | | | | | They're costly. This will also avoid some edge cases where charlock_holmes assigns a weird encoding to a perfectly valid UTF-8 string.
* remove useless commentmicael.bergeron2017-09-061-2/+0
|
* renames ambiguous methods and add specmicael.bergeron2017-09-061-5/+5
|
* fix refactoring error with Blob.binary?micael.bergeron2017-09-061-4/+4
| | | | remove some lint
* revert to using a simple representationmicael.bergeron2017-09-061-5/+12
|
* wip: fake its a binary diffmicael.bergeron2017-09-061-4/+12
|
* Raise encoding confidence threshold to 50Lin Jen-Shin2017-08-081-1/+1
| | | | | | | | | | | | | | | It is recommended that we set this to 50: https://gitlab.com/gitlab-org/gitlab-ce/issues/35098#note_35036746 In this particular issue, the confidence was 42 for Shift JIS, but in fact that's encoded in UTF-8 just with a single bad character. In this case, we shouldn't try to treat it as Shift JIS, but just treat it as UTF-8 and remove invalid bytes. Treating it like Shift JIS would corrupt the whole data. Unfortunately, the diff which would cause this could not be disclosed therefore we can't use it as a test example.
* Fix binary encoding error on MR diffsJames Lopez2017-06-061-1/+1
|
* Rename `Gitlab::Git::EncodingHelper` to `Gitlab::EncodingHelper`Bob Van Landuyt2017-06-011-0/+62