Gentoo Archives: gentoo-commits

From: "Hans de Graaff (graaff)" <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/sinatra/files: sinatra-1.4.4-fix-tests.patch
Date: Thu, 21 Nov 2013 07:32:22
Message-Id: 20131121073219.B1D932004B@flycatcher.gentoo.org
1 graaff 13/11/21 07:32:19
2
3 Added: sinatra-1.4.4-fix-tests.patch
4 Log:
5 Version bump. Add ruby20.
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
8
9 Revision Changes Path
10 1.1 dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch?rev=1.1&content-type=text/plain
14
15 Index: sinatra-1.4.4-fix-tests.patch
16 ===================================================================
17 commit c5c9f6b5501a366d5809faa44e50fad371c14870
18 Author: Jon Rowe <hello@××××××××××.uk>
19 Date: Tue Oct 29 14:18:46 2013 +1100
20
21 fixes the build by disabling path traversal protection for this test
22
23 Seems that this test is in direct competition with the desired
24 behaviour of path traversal protection.
25
26 diff --git a/test/routing_test.rb b/test/routing_test.rb
27 index 410bfda..5584601 100644
28 --- a/test/routing_test.rb
29 +++ b/test/routing_test.rb
30 @@ -90,7 +90,10 @@ class RoutingTest < Test::Unit::TestCase
31 end
32
33 it "it handles encoded slashes correctly" do
34 - mock_app { get("/:a") { |a| a } }
35 + mock_app {
36 + set :protection, :except => :path_traversal
37 + get("/:a") { |a| a }
38 + }
39 get '/foo%2Fbar'
40 assert_equal 200, status
41 assert_body "foo/bar"