ostatus2 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ostatus2/salmon.rb +5 -5
- data/lib/ostatus2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d26eccb4629b92d819c936178da70bc11afe09db
|
4
|
+
data.tar.gz: b3920f6bb53f50760e6405e836792eac079e3a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47bf93c810f1d84d9b67bb3c59de4c3c3483e2f8bbaf87ae35396bd1b95c43d4d3f621fbc41c95d369aa46f13da611e6c69d7ee08d4cc5b5fd8ebb01b83631a6
|
7
|
+
data.tar.gz: dbab12a9cd9f1bf2c165bfa5fa787baa7453d65e5e853bc7174b8bcfbe4871df2169cb794460febbe0a3abede83de8d896144c977b5f7a1a8b0dd4697f825217
|
data/lib/ostatus2/salmon.rb
CHANGED
@@ -66,15 +66,15 @@ module OStatus2
|
|
66
66
|
def parse(raw_body)
|
67
67
|
xml = Nokogiri::XML(raw_body)
|
68
68
|
|
69
|
-
raise OStatus2::BadSalmonError if xml.at_xpath('//me:data').nil? || xml.at_xpath('//me:data').attribute('type').nil? || xml.at_xpath('//me:sig').nil? || xml.at_xpath('//me:encoding').nil? || xml.at_xpath('//me:alg').nil?
|
69
|
+
raise OStatus2::BadSalmonError if xml.at_xpath('//me:data', me: XMLNS).nil? || xml.at_xpath('//me:data', me: XMLNS).attribute('type').nil? || xml.at_xpath('//me:sig', me: XMLNS).nil? || xml.at_xpath('//me:encoding', me: XMLNS).nil? || xml.at_xpath('//me:alg', me: XMLNS).nil?
|
70
70
|
|
71
|
-
data = xml.at_xpath('//me:data')
|
71
|
+
data = xml.at_xpath('//me:data', me: XMLNS)
|
72
72
|
type = data.attribute('type').value
|
73
73
|
body = decode_base64(data.content)
|
74
|
-
sig = xml.at_xpath('//me:sig')
|
74
|
+
sig = xml.at_xpath('//me:sig', me: XMLNS)
|
75
75
|
signature = decode_base64(sig.content)
|
76
|
-
encoding = xml.at_xpath('//me:encoding').content
|
77
|
-
alg = xml.at_xpath('//me:alg').content
|
76
|
+
encoding = xml.at_xpath('//me:encoding', me: XMLNS).content
|
77
|
+
alg = xml.at_xpath('//me:alg', me: XMLNS).content
|
78
78
|
plaintext = plaintext_signature(body, type, encoding, alg)
|
79
79
|
|
80
80
|
[body, plaintext, signature]
|
data/lib/ostatus2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ostatus2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugen Rochko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|