Skip to content

Commit

Permalink
Bump version to 0.1.19
Browse files Browse the repository at this point in the history
Address CVE-2020-8130 - `rake` OS command injection vulnerability
Fix some Rubocop warnings
  • Loading branch information
abrom committed Mar 1, 2020
1 parent 4664693 commit 13f430b
Show file tree
Hide file tree
Showing 41 changed files with 91 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
## Unreleased
- None

## [0.1.19](releases/tag/v0.1.19) - 2019-03-01
### Fixed
- Address CVE-2020-8130 - `rake` OS command injection vulnerability

## [0.1.18](releases/tag/v0.1.18) - 2018-01-05
### Added
- [#29] Support for im.create and im.counters ([@christianmoretti][])
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in rocketchat.gemspec
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

Expand Down
1 change: 1 addition & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'rocketchat'
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
class Error < StandardError; end
class HTTPError < Error; end
Expand Down
4 changes: 3 additions & 1 deletion lib/rocket_chat/gem_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
VERSION = '0.1.18'.freeze
VERSION = '0.1.19'
end
2 changes: 2 additions & 0 deletions lib/rocket_chat/im_summary.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat IM Summary
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/info.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Info
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/message.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Message
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/channel.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/chat.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/group.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/im.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/list_support.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/room.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/room_support.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/settings.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/messages/user_support.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
module Messages
#
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/presence_status.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat PresenceStatus
Expand Down
4 changes: 3 additions & 1 deletion lib/rocket_chat/request_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'uri'
require 'openssl'
require 'net/http'
Expand Down Expand Up @@ -30,7 +32,7 @@ def request_json(path, options = {})
check_response response, fail_unless_ok

response_json = parse_response(response.body)
options[:debug].puts("Response: #{response_json.inspect}") if options[:debug]
options[:debug]&.puts("Response: #{response_json.inspect}")
check_response_json response_json, upstreamed_errors

response_json
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/room.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Room
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/server.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Server
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/session.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Session
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/token.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat Token
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat User
Expand Down
2 changes: 2 additions & 0 deletions lib/rocket_chat/util.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RocketChat
#
# Rocket.Chat generic utility functions
Expand Down
2 changes: 2 additions & 0 deletions lib/rocketchat.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'rocket_chat/gem_version'

require 'json'
Expand Down
4 changes: 3 additions & 1 deletion rocketchat.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Expand All @@ -19,7 +21,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler', ['>= 1.11', '< 3.0']
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rake', '>= 12.3.3'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 0.62'
spec.add_development_dependency 'rubocop-rspec', '~> 1.31'
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/message_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Message do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/channel_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::Channel do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/chat_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::Chat do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/group_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::Group do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/im_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::Im do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/settings_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::Settings do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/messages/user_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Messages::User do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Server do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/session_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::Session do
Expand Down
2 changes: 2 additions & 0 deletions spec/rocket_chat/user_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe RocketChat::User do
Expand Down
2 changes: 2 additions & 0 deletions spec/shared/room_behaviors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

shared_examples 'room_behavior' do |room_type: nil, query: false|
let(:server) { RocketChat::Server.new(SERVER_URI) }
let(:token) { RocketChat::Token.new(authToken: AUTH_TOKEN, userId: USER_ID) }
Expand Down
12 changes: 7 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'simplecov'
SimpleCov.start

Expand All @@ -10,11 +12,11 @@
require 'shared/room_behaviors'

SERVER_URI = URI.parse('http://www.example.com/')
AUTH_TOKEN = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.freeze
USER_ID = 'AAAAAAAAAAAAAAAAA'.freeze
OTHER_USER_ID = 'BBBBBBBBBBBBBBBBB'.freeze
USERNAME = 'user'.freeze
PASSWORD = 'password'.freeze
AUTH_TOKEN = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
USER_ID = 'AAAAAAAAAAAAAAAAA'
OTHER_USER_ID = 'BBBBBBBBBBBBBBBBB'
USERNAME = 'user'
PASSWORD = 'password'
UNAUTHORIZED_BODY = {
status: :error,
message: 'You must be logged in to do this.'
Expand Down

0 comments on commit 13f430b

Please sign in to comment.