redfinger 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/redfinger/client.rb +6 -1
- data/redfinger.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/redfinger/client.rb
CHANGED
@@ -28,7 +28,12 @@ module Redfinger
|
|
28
28
|
|
29
29
|
def retrieve_template_from_xrd(ssl = true)
|
30
30
|
doc = Nokogiri::XML::Document.parse(RestClient.get(xrd_url(ssl)).body)
|
31
|
-
|
31
|
+
if doc.namespaces["xmlns:hm"] != "http://host-meta.net/xrd/1.0"
|
32
|
+
# it's probably not finger, let's try without ssl
|
33
|
+
# http://code.google.com/p/webfinger/wiki/WebFingerProtocol
|
34
|
+
# says first ssl should be tried then without ssl, should fix issue #2
|
35
|
+
doc = Nokogiri::XML::Document.parse(RestClient.get(xrd_url(false)).body)
|
36
|
+
end
|
32
37
|
unless doc.at_xpath('.//hm:Host').content == self.domain
|
33
38
|
raise Redfinger::SecurityException, "The XRD document's host did not match the account's host."
|
34
39
|
end
|
data/redfinger.gemspec
CHANGED