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

Fixed base64 encoding appending a newline #36

Merged
merged 1 commit into from
Mar 1, 2015

Conversation

BackSlasher
Copy link
Contributor

Method encode64 appends a newline which ruins nginx config.
Method strict_encode64 does the same without newlines.

require 'base64'
gu='ga'
gp='gu'

Base64.encode64        "#{gu}:#{gp}" # "Z2E6Z3U=\n"
Base64.strict_encode64 "#{gu}:#{gp}" # "Z2E6Z3U="

Method `encode64` appends a newline which ruins nginx config.
Method `strict_encode64` does the same without newlines.

```ruby
require 'base64'
gu='ga'
gp='gu'

Base64.encode64        "#{gu}:#{gp}" # "Z2E6Z3U=\n"
Base64.strict_encode64 "#{gu}:#{gp}" # "Z2E6Z3U="
```
@JonathanTron
Copy link
Contributor

Thanks.

JonathanTron added a commit that referenced this pull request Mar 1, 2015
Fixed base64 encoding appending a newline
@JonathanTron JonathanTron merged commit 5149589 into sous-chefs:master Mar 1, 2015
@BackSlasher BackSlasher deleted the fix_base64 branch March 2, 2015 13:38
@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants