Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.91.0"
".": "1.91.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.91.1 (2025-09-26)

Full Changelog: [v1.91.0...v1.91.1](https://github.com/Increase/increase-ruby/compare/v1.91.0...v1.91.1)

### Bug Fixes

* shorten multipart boundary sep to less than RFC specificed max length ([5cb2c65](https://github.com/Increase/increase-ruby/commit/5cb2c65146a070d5ecbe1e459858669e598449ad))

## 1.91.0 (2025-09-26)

Full Changelog: [v1.90.0...v1.91.0](https://github.com/Increase/increase-ruby/compare/v1.90.0...v1.91.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
increase (1.91.0)
increase (1.91.1)
connection_pool

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "increase", "~> 1.91.0"
gem "increase", "~> 1.91.1"
```

<!-- x-release-please-end -->
Expand Down
3 changes: 2 additions & 1 deletion lib/increase/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@ class << self
#
# @return [Array(String, Enumerable<String>)]
private def encode_multipart_streaming(body)
boundary = SecureRandom.urlsafe_base64(60)
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
boundary = SecureRandom.urlsafe_base64(46)

closing = []
strio = writable_enum do |y|
Expand Down
2 changes: 1 addition & 1 deletion lib/increase/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Increase
VERSION = "1.91.0"
VERSION = "1.91.1"
end
12 changes: 12 additions & 0 deletions test/increase/internal/util_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ def env_table
end
end

def test_encoding_length
headers, = Increase::Internal::Util.encode_content(
{"content-type" => "multipart/form-data"},
Pathname(__FILE__)
)
assert_pattern do
headers.fetch("content-type") => /boundary=(.+)$/
end
field, = Regexp.last_match.captures
assert(field.length < 70 - 6)
end

def test_file_encode
file = Pathname(__FILE__)
headers = {"content-type" => "multipart/form-data"}
Expand Down