dav4rack 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -112,9 +112,9 @@ module DAV4Rack
112
112
  def move(*args)
113
113
  raise NotFound unless resource.exist?
114
114
  resource.lock_check unless args.include?(:copy)
115
- dest_uri = URI.parse(env['HTTP_DESTINATION'])
116
- destination = url_unescape(dest_uri.path)
117
- raise BadGateway if dest_uri.host and dest_uri.host != request.host
115
+ destination = url_unescape(env['HTTP_DESTINATION'].sub(%r{https?://([^/]+)}, ''))
116
+ dest_host = $1
117
+ raise BadGateway if dest_host and dest_host != request.host
118
118
  raise Forbidden if destination == resource.public_path
119
119
  dest = resource_class.new(destination, clean_path(destination), @request, @response, @options.merge(:user => resource.user))
120
120
  status = nil
@@ -1,3 +1,3 @@
1
1
  module DAV4Rack
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dav4rack
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Roberts
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-07 00:00:00 -08:00
18
+ date: 2011-01-24 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency