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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbf294e569b899f5aeb8406caca3a35230ac66d1
4
- data.tar.gz: dfb5ffa9813a7738bdaa54fca1726fcdd58375ac
3
+ metadata.gz: d26eccb4629b92d819c936178da70bc11afe09db
4
+ data.tar.gz: b3920f6bb53f50760e6405e836792eac079e3a14
5
5
  SHA512:
6
- metadata.gz: 327e56801a53d5c0cf885c5d8523b5d05c7773aa0a44f6a5017fc35f08dc3c5360ab9a543a17a300f646d8cf1babdb150a428652301f0929ce7959a883392c7b
7
- data.tar.gz: 20eb364b94680f55ce7421e6cb202a99eecacb411e84f7ed376fcfd063601beb964e07b03152a998092ad9c5c03aa578766d1d57e20edb99012f2d6636cf258a
6
+ metadata.gz: 47bf93c810f1d84d9b67bb3c59de4c3c3483e2f8bbaf87ae35396bd1b95c43d4d3f621fbc41c95d369aa46f13da611e6c69d7ee08d4cc5b5fd8ebb01b83631a6
7
+ data.tar.gz: dbab12a9cd9f1bf2c165bfa5fa787baa7453d65e5e853bc7174b8bcfbe4871df2169cb794460febbe0a3abede83de8d896144c977b5f7a1a8b0dd4697f825217
@@ -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]
@@ -1,3 +1,3 @@
1
1
  module OStatus2
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2016-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http