mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
0d5674d84a
The previous boundary used a random number up to 1,000,000 as the boundary. This is extremely low entropy compared to what most major browsers use (20 bits). Instead, use a convention more like WebKit. RestClient previously would be completely unable to upload a file generated like so, containing `--0--` through `--1000000--`: File.open('foo.txt', 'w') {|f| 1_000_000.times {|i| f.write("--#{i}--\n") }} Instead, the boundary now looks like this, with about 95 bits of entropy: `----RubyFormBoundaryFg2MqiXXQlT5RkUF` |
||
---|---|---|
.. | ||
restclient | ||
rest-client.rb | ||
rest_client.rb | ||
restclient.rb |