egalite 1.5.11 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe5255732f5d703cfb46475c6ebc51672236d996
4
- data.tar.gz: 76e007da6bcc16dfe1187a9c1f3a9a61837babff
3
+ metadata.gz: af360c5c9530b4c2f17bc1c42003cc25adbc42b7
4
+ data.tar.gz: 0b9d0dde1662c4ab5cf8a4cd6f72569442a6b25b
5
5
  SHA512:
6
- metadata.gz: e2a9545feeb3b4a72839f766480fe83e114b12a7b886e906d156fef355ee85d276bda78d428e66cbde9e267c820fa26240174993c5434b4295bd64432a837665
7
- data.tar.gz: cf7b017f2ba1e551d919820c996bb6aafb19c25f261ff335c3d62077fa62d4ef4ac0f94c32a358aa5805d702a5384fd92e3cbbfcccb3625054f8146585257ac2
6
+ metadata.gz: dbd4f55fa4eaecef7fa0e4fa48666f210ee17cc7eef8130949d86b75030a3cfec0831d90146a2d362df903cda4eb5ef14ef6607fe94f6133ccd3a012592d6e99
7
+ data.tar.gz: 753eed14ef841581c73b79f6e6832e0211bb4db02192d57d23c6309840cae4fb40ae96ffbdc9ddd2510cc00826056110fa642760770832c81d28f50fa4cb75dd
@@ -1,3 +1,3 @@
1
1
  module Egalite
2
- VERSION = "1.5.11"
2
+ VERSION = "1.5.12"
3
3
  end
data/lib/egalite.rb CHANGED
@@ -455,7 +455,8 @@ class Handler
455
455
  end
456
456
  end
457
457
  def redirect(url)
458
- [302,{'Location' => URI.escape(url)}, [url]]
458
+ url = url.gsub(/\r/, "%0D").gsub(/\n/, "%0A")
459
+ [302,{'Location' => url}, [url]]
459
460
  end
460
461
  def get_controller(controllername,action, method)
461
462
  action = method if action.blank?
data/test/test_handler.rb CHANGED
@@ -129,9 +129,9 @@ class T_Handler < Test::Unit::TestCase
129
129
  post "/test/location", {:url => "http://example.com/test"}
130
130
  assert last_response.redirect?
131
131
  assert_equal "http://example.com/test", last_response.headers['location']
132
- post "/test/location", {:url => "/foo\nbar"}
132
+ post "/test/location", {:url => "/foo\r\nbar"}
133
133
  assert last_response.redirect?
134
- assert_equal "/foo%0Abar", last_response.headers['location']
134
+ assert_equal "/foo%0D%0Abar", last_response.headers['location']
135
135
  end
136
136
  def test_accesslog
137
137
  io = StringIO.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egalite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.11
4
+ version: 1.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shunichi Arai