Permalink
Browse files

GETデータが上書きされるバグ対応

  • Loading branch information...
1 parent 77a43e4 commit 5a7cf12181ebcb91e93d6bad51fe7df98b350927 @xanagi xanagi committed Jul 5, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/opensocial-wap/session/opensocial_wap_sid.rb
@@ -18,7 +18,7 @@ def self.included(base)
# request.params メソッドを使用しないこと(文字コード変換で問題が発生するため).
def extract_session_id(env)
stale_session_check! do
- request = ActionDispatch::Request.new(env)
+ request = ::Rack::Request.new(env)
if use_opensocial_wap_sid?(request)
# opensocial_(viewer|owner)_id をsession_idとして使用.
sid = opensocial_user_id(request)
@@ -44,7 +44,7 @@ def use_opensocial_wap_sid?(request)
sid = app_config.opensocial_wap[:session_id] || :cookie # デフォルトでは無効(cookieからセッションIDを取得する).
if sid.to_sym == :parameter
# OAuthの検証にパスしている.
- if request.opensocial_oauth_verified?
+ if request.env['opensocial-wap.oauth-verified']
# opensocial_(viewer|owner)_id がクエリパラメータに存在する.
if opensocial_user_id(request)
return true
@@ -58,7 +58,7 @@ def use_opensocial_wap_sid?(request)
def opensocial_user_id(request)
unless @opensocial_user_id
params = begin
- request.GET.update(request.POST)
+ request.GET.merge(request.POST)
rescue EOFError => e
request.GET
end

0 comments on commit 5a7cf12

Please sign in to comment.