Skip to content

Fixed base64 encoding appending a newline#36

Merged
JonathanTron merged 1 commit intosous-chefs:masterfrom
BackSlasher:fix_base64
Mar 1, 2015
Merged

Fixed base64 encoding appending a newline#36
JonathanTron merged 1 commit intosous-chefs:masterfrom
BackSlasher:fix_base64

Conversation

@BackSlasher
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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