distack-urlsign 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/distack/urlsign/signer.rb +2 -1
- data/lib/distack/urlsign/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 745e324c38d3c2c0fafb181c84ed5749e6863bda
|
4
|
+
data.tar.gz: fc92d7917e73f06cf2bd6d04f1ebb31483d801dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aba5d78de6da6c8c2bf3c5a8b6ef591f4354a3a1738122b89ab44c6b1eef16d0fabc2d70223a3339dad9e5a74dfbe5814064a631ca9f1be8f1a4f84c54db035f
|
7
|
+
data.tar.gz: b03b1a4ad561ead878ac870a4e693c3347c16c7412a34f0a2dbd1f1767971dd955bfc9f66d215426cea629b3d8eaac7be796397f8ca412505b001e626092420d
|
@@ -17,7 +17,8 @@ module Distack::URLSign
|
|
17
17
|
raise "can't sign opaque URL"
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
host_with_port = url.port == url.default_port ? url.host : "#{url.host}:#{url.port}"
|
21
|
+
chunks = [url.scheme, host_with_port, url.path, url.query, url.userinfo].compact
|
21
22
|
digest = OpenSSL::Digest.new("sha512")
|
22
23
|
|
23
24
|
rawsig = OpenSSL::HMAC.digest(digest, @key, chunks.join)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distack-urlsign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Kochenburger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -107,8 +107,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.4.5
|
110
|
+
rubygems_version: 2.4.5.1
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: urlsign is a simple HMAC-based implementation for URL signing and verification
|
114
114
|
test_files: []
|
115
|
+
has_rdoc:
|