rails:3157
From: しん <dezawa@a...>
Date: Thu, 13 Aug 2009 17:10:37 +0900 (JST)
Subject: [rails:3157] ユーザ認証の動きが IE と firefox で異なる
出沢です このところ色々お世話になっています。 今までfirefoxで評価していたました。 会社の標準のIE-6 でも念のために見ておこうと使ってみたところ動きが異なり、 一点問題もあるので相談させてください。 システムは Linux/ruby 1.8.7/Rails 2.3.2 を使い、 ユーザ認証はrestful_authenticationをアクチヴェーションなしで使っています。 動きが異なるのは2点 1 ログイン画面が異なる firewax: restful_authentication の sessions/new にリダイレクトされる IE : ブラウザーのBasic認証画面が出る 2 ログアウトがうまくいかない firefox:ログアウトすると sessions/new にリダイレクトされる IE :You have been logged out. のflash付でrootのURLに移る。 そのあと他の画面に移るとログインしているときと同じ様に使える 1の方の致命度は低いのですが 2の方は困るので少なくともこちらを何とかしたい のです。 なおIEのBasic認証画面にて、パスワードを保存させていません クッキーは発行していません よろしくお願いします。 そのときの log/development.log です ### firefoxの場合 #### # root URL で redirectされ Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 13:55:45) [GET] Redirected to http://localhost:3000/session/new Filter chain halted as [:login_required] rendered_or_redirected. Completed in 3ms (DB: 1) | 302 Found [http://localhost/] # 認証画面が出て Processing SessionsController#new (for ::ffff:133.170.208.26 at 2009-08-13 13:55:45) [GET] Rendering sessions/new Completed in 23ms (View: 19, DB: 1) | 200 OK [http://localhost/session/new] # ログインすると Processing SessionsController#create (for ::ffff:133.170.208.26 at 2009-08-13 13:55:53) [POST] Parameters: {"commit"=>"Log in", "authenticity_token"=>"QrH9STscu6qzY7xREMMw4cPqEJtmSGv+BxQURlQHFsU=", "login"=>"guest", "password"=>"test"} User Load (1.7ms) SELECT TOP 1 * FROM [users] WHERE ([users].[login] = 'guest') Redirected to http://localhost:3000/ Completed in 30ms (DB: 9) | 302 Found [http://localhost/session] # root URL にredirect される Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 13:55:54) [GET] User Load (1.7ms) SELECT TOP 1 * FROM [users] WHERE ([users].[id] = 4) Roll Load (1.3ms) SELECT * FROM [rolls] WHERE ([rolls].[id] = 2) Rendering template within layouts/flows Rendering flows/index Completed in 51ms (View: 9, DB: 13) | 200 OK [http://localhost/] # ログアウトすると Processing SessionsController#destroy (for ::ffff:133.170.208.26 at 2009-08-13 13:55:57) [GET] User Load (1.7ms) SELECT TOP 1 * FROM [users] WHERE ([users].[id] = 4) EXECUTE (0.6ms) BEGIN TRANSACTION EXECUTE (0.6ms) COMMIT TRANSACTION Redirected to http://localhost:3000/ Completed in 34ms (DB: 11) | 302 Found [http://localhost/logout] # root URLへ来て(これはdefault で来るようです) Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 13:55:57) [GET] Redirected to http://localhost:3000/session/new Filter chain halted as [:login_required] rendered_or_redirected. Completed in 3ms (DB: 1) | 302 Found [http://localhost/] # ログイン画面に redirect される Processing SessionsController#new (for ::ffff:133.170.208.26 at 2009-08-13 13:55:57) [GET] Rendering sessions/new Completed in 9ms (View: 5, DB: 1) | 200 OK [http://localhost/session/new] #### IE の場合 #### # 最初は redirectされて Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 14:11:20) [GET] Filter chain halted as [:login_required] rendered_or_redirected. Completed in 5ms (View: 3, DB: 1) | 401 Unauthorized [http://localhost/] # ブラウザーの認証画面を通るのでいきなり rootのURLに Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 14:11:26) [GET] User Load (1.7ms) SELECT TOP 1 * FROM [users] WHERE ([users].[login] = 'guest') Roll Load (1.7ms) SELECT * FROM [rolls] WHERE ([rolls].[id] = 2) Rendering template within layouts/flows Rendering flows/index Completed in 56ms (View: 5, DB: 14) | 200 OK [http://localhost/] # ログアウトすると Processing SessionsController#destroy (for ::ffff:133.170.208.26 at 2009-08-13 14:11:28) [GET] User Load (1.8ms) SELECT TOP 1 * FROM [users] WHERE ([users].[id] = 4) EXECUTE (0.5ms) BEGIN TRANSACTION EXECUTE (0.6ms) COMMIT TRANSACTION Redirected to http://localhost:3000/ Completed in 34ms (DB: 11) | 302 Found [http://localhost/logout] # そのまま rootのURLへ 、redirectはされない Processing FlowsController#index (for ::ffff:133.170.208.26 at 2009-08-13 14:11:29) [GET] User Load (2.1ms) SELECT TOP 1 * FROM [users] WHERE ([users].[login] = 'guest') Roll Load (1.7ms) SELECT * FROM [rolls] WHERE ([rolls].[id] = 2) Rendering template within layouts/flows Rendering flows/index Completed in 62ms (View: 5, DB: 16) | 200 OK [http://localhost/] -- ML: rails@r... 使い方: http://QuickML.com/
-> 3157 2009-08-13 10:10 [dezawa@a... ] ユーザ認証の動きが IE と firefox で異なる 3158 2009-08-13 10:43 ┗[sakuro@2... ] 3159 2009-08-13 12:52 ┗[dezawa@a... ]