Skip to content

Commit

Permalink
Fixed rest client sec vuln. Logged room error. 0.3.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Dec 13, 2019
1 parent 281f3c1 commit d09678e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/lita/handlers/onewheel_twitter_photo.rb
Expand Up @@ -28,12 +28,15 @@ def get_twitter_title(response)
if response.message.source.room == config.room
uri = response.matches[0][0]
uri.sub! /mobile\./, ''
Lita.logger.debug "Getting #{uri}"
doc = RestClient.get uri
noko_doc = Nokogiri::HTML doc
title = noko_doc.xpath('//title').text.to_s
Lita.logger.debug title
response.reply title
get_twitter_photo(response)
else
Lita.logger.debug "#{response.message.source.room} !== #{config.room}"
end
end

Expand Down
6 changes: 3 additions & 3 deletions lita-onewheel-twitter-photo.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-twitter-photo'
spec.version = '0.2.1'
spec.version = '0.3.0'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = %q{Lita interface to post links to twitter photos.}
Expand All @@ -14,8 +14,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_runtime_dependency 'lita', '~> 4'
spec.add_runtime_dependency 'rest-client', '~> 1'
spec.add_runtime_dependency 'lita', '~> 4.4'
spec.add_runtime_dependency 'rest-client', '~> 2'
spec.add_runtime_dependency 'nokogiri', '~> 1'

spec.add_development_dependency 'bundler', '~> 1'
Expand Down

0 comments on commit d09678e

Please sign in to comment.