kanoko 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62113de2243d4d63be1ca41171ca1bf59aadaeb8
4
- data.tar.gz: e0e960c13f8f79f26fbb8c05f418dec21ccbf560
3
+ metadata.gz: 2bb14e5d991054049e19110d50de0645f8e5e4e2
4
+ data.tar.gz: 9d937dbe7cb9d93183130f7f4dc1b5e30f5c9054
5
5
  SHA512:
6
- metadata.gz: d863de76d39f3273b4cc4d96a35b52c99cdd63cb282260d78c945905e5c658b0aa4ce63b19a953c9c0382c87fd8faebd8a787d9d84820de47e49824bc707f819
7
- data.tar.gz: 351981e3d1489b34fbd6d79c49b30d896f60b97e9c5c03b57607c3de9769ae4b481c36e510719dcce1dcaf07d14d975f99ee4a02e883b773bf864f67cd086fd1
6
+ metadata.gz: 744b4e38f86f5d12ea30a82d169ce0c7808acb2afb7cf515ab638fd3265caebb0594cac9fe6e32fb92a32933e60a2e66d8606db5146c5606162b8c59a7d7a6f6
7
+ data.tar.gz: 9d19cfeca0bdef8ded0195ba00bdccc7abc297f148c00db1ad00295f253a8bba00bff6665be96d4e3b7e4084c38efe4d043197ba215e58f43b1ab0f2c832b3a1
@@ -49,11 +49,10 @@ module Kanoko
49
49
  logger.error "invalid url #{request_uri}"
50
50
  return 400
51
51
  end
52
-
53
- hint_index = request_uri.to_s.index(hint_src)
52
+ hint_index = request_uri.to_s.index(argument.path) + argument.path.length + 1
54
53
  src_path = request_uri.to_s[hint_index..-1]
55
-
56
- unless hash == Kanoko.make_hash(*(argument.to_a.flatten), src_path)
54
+ src_path_unescaped = URI.decode_www_form_component(src_path).force_encoding('UTF-8')
55
+ unless hash == Kanoko.make_hash(*(argument.to_a.flatten), src_path_unescaped)
57
56
  logger.error "hash check failed #{[*(argument.to_a.flatten), src_path]}"
58
57
  return 400
59
58
  end
@@ -1,3 +1,3 @@
1
1
  module Kanoko
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanoko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra