Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
ec1bd987
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ec1bd987
编写于
12月 16, 2008
作者:
J
Joshua Peek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Session Fixation tests have been rolled into the session cookie tests
上级
8c3a5436
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
0 addition
and
84 deletion
+0
-84
actionpack/test/controller/session_fixation_test.rb
actionpack/test/controller/session_fixation_test.rb
+0
-84
未找到文件。
actionpack/test/controller/session_fixation_test.rb
已删除
100644 → 0
浏览文件 @
8c3a5436
# require 'abstract_unit'
#
# class SessionFixationTest < ActionController::IntegrationTest
# class TestController < ActionController::Base
# session :session_key => '_myapp_session_id',
# :secret => CGI::Session.generate_unique_id,
# :except => :default_session_key
#
# session :cookie_only => false,
# :only => :allow_session_fixation
#
# def default_session_key
# render :text => "default_session_key"
# end
#
# def custom_session_key
# render :text => "custom_session_key: #{params[:id]}"
# end
#
# def allow_session_fixation
# render :text => "allow_session_fixation"
# end
#
# def rescue_action(e) raise end
# end
#
# def setup
# @controller = TestController.new
# end
#
# def test_should_be_able_to_make_a_successful_request
# with_test_route_set do
# assert_nothing_raised do
# get '/custom_session_key', :id => "1"
# end
# assert_equal 'custom_session_key: 1', @controller.response.body
# assert_not_nil @controller.session
# end
# end
#
# def test_should_catch_session_fixation_attempt
# with_test_route_set do
# assert_raises(ActionController::RackRequest::SessionFixationAttempt) do
# get '/custom_session_key', :_myapp_session_id => "42"
# end
# assert_nil @controller.session
# end
# end
#
# def test_should_not_catch_session_fixation_attempt_when_cookie_only_setting_is_disabled
# with_test_route_set do
# assert_nothing_raised do
# get '/allow_session_fixation', :_myapp_session_id => "42"
# end
# assert !@controller.response.body.blank?
# assert_not_nil @controller.session
# end
# end
#
# def test_should_catch_session_fixation_attempt_with_default_session_key
# # using the default session_key is not possible with cookie store
# ActionController::Base.session_store = :p_store
#
# with_test_route_set do
# assert_raises ActionController::RackRequest::SessionFixationAttempt do
# get '/default_session_key', :_session_id => "42"
# end
# assert_nil @controller.response
# assert_nil @controller.session
# end
# end
#
# private
# def with_test_route_set
# with_routing do |set|
# set.draw do |map|
# map.with_options :controller => "session_fixation_test/test" do |c|
# c.connect "/:action"
# end
# end
# yield
# end
# end
# end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录