summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/encoding_helper_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update specs to exclude possible false positive passblackst0ne2018-12-181-1/+1
|
* Fix Error 500s due to encoding issues when Wiki hooks fireStan Hu2018-08-291-0/+12
| | | | | | | | | | | | 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
* Fix EncodingHelper#clean blowing up on UTF-16BE stringsfix/encoding-helper-clean-blowing-up-on-utf-16beAhmad Sherif2018-03-221-0/+5
| | | | Closes gitaly#1101
* Return a warning string if we try to encode to unsupported encodingAhmad Sherif2018-02-091-0/+5
| | | | 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-0/+18
|
* Move encoding methods to the more general EncodingHelpergitaly-encoding-helpersAlejandro Rodríguez2017-12-281-0/+14
|
* Fix encoding bugs in Gitlab::Git::UserJacob Vosmaer (GitLab)2017-11-231-0/+1
|
* Avoind unnecesary `force_encoding` operationsAlejandro Rodríguez2017-10-181-2/+14
| | | | | | They're costly. This will also avoid some edge cases where charlock_holmes assigns a weird encoding to a perfectly valid UTF-8 string.
* Make sure that we have author and committerLin Jen-Shin2017-08-081-0/+3
| | | | In case we don't have it setup in ~/.gitconfig
* Add a test to show that threshold 40 would corrupt35098-raise-encoding-confidence-thresholdLin Jen-Shin2017-08-081-0/+44
| | | | | | | | | | | If we set `ENCODING_CONFIDENCE_THRESHOLD` to 40, this test case would not pass. If we raise to 50, this would pass. Note that if in the future rugged didn't return corrupt data, this would be less relevant. But still icu recommend the threshold to be 50, we should just stick with 50.
* Rename `Gitlab::Git::EncodingHelper` to `Gitlab::EncodingHelper`Bob Van Landuyt2017-06-011-0/+88