Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16 from sayhiben/master
Browse files Browse the repository at this point in the history
Use CGI::escape rather than URI.escape for query params
  • Loading branch information
Chase Lee committed Jun 22, 2015
2 parents b509bcf + dbcd682 commit 15959b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/mbsy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'cgi'
require 'httparty'
require 'json'
require 'mbsy/resources/base'
Expand Down
2 changes: 1 addition & 1 deletion lib/mbsy/util/single_sign_on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.embed_html(o)
raise ArgumentError, "key :email is required" if options[:email].blank?
raise ArgumentError, ":method must be either :login or :logout" unless %w(login logout).include?( options[:method].to_s )
signature = Digest::SHA1.hexdigest( options[:api_key] + options[:email] )
%Q|<img src="https://#{Mbsy.user_name}.getambassador.com/sso/#{options[:method]}/?token=#{options[:token]}&email=#{URI.escape(options[:email])}&signature=#{signature}" style="border: none; visibility: hidden" alt="" />|
%Q|<img src="https://#{Mbsy.user_name}.getambassador.com/sso/#{options[:method]}/?token=#{options[:token]}&email=#{CGI::escape(options[:email])}&signature=#{signature}" style="border: none; visibility: hidden" alt="" />|
end


Expand Down

0 comments on commit 15959b6

Please sign in to comment.