Skip to content
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

Ignore invalid byte encodings when detecting rails config #854

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

schneems
Copy link
Contributor

Previously if a customer had an invalid byte sequence emitted during boot up, it would raise an error:

invalid byte sequence in UTF-8

Which would prevent configuration detection from functioning correctly.

When detecting rails configuration, we know that the input we are trying to detect for success will be UTF-8. As a result, we can ignore any other encoded characters.

This PR prevents an invalid byte sequence from blocking rails configuration detection.

Reference internal support ticket number: 681812

Here's a blog post on invalid byte sequences if you're interested https://thoughtbot.com/blog/fight-back-utf-8-invalid-byte-sequences.

Previously if a customer had an invalid byte sequence emitted during boot up, it would raise an error:

```
invalid byte sequence in UTF-8
```

Which would prevent configuration detection from functioning correctly. 

When detecting rails configuration, we know that the input we are trying to detect for success will be UTF-8. As a result, we can ignore any other encoded characters.

This PR prevents an invalid byte sequence from blocking rails configuration detection.

Reference internal support ticket number: 681812

Here's a blog post on invalid byte sequences if you're interested https://thoughtbot.com/blog/fight-back-utf-8-invalid-byte-sequences.
@schneems schneems merged commit 4f31d79 into master Feb 20, 2019
@schneems
Copy link
Contributor Author

schneems commented Mar 7, 2019

This has been deployed

@edmorley edmorley deleted the schneems/fix-bytes branch August 27, 2020 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants