projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cef4792
)
Make trac use https when authenticating
author
Tom Hughes
<tom@compton.nu>
Sat, 10 Feb 2018 17:14:20 +0000
(17:14 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 10 Feb 2018 17:14:20 +0000
(17:14 +0000)
cookbooks/trac/files/default/trac-authenticate
patch
|
blob
|
history
diff --git
a/cookbooks/trac/files/default/trac-authenticate
b/cookbooks/trac/files/default/trac-authenticate
index 489a12ca06825b06d234fa9422a4f4119d8a7bb0..a255637364fbbbc389bfa20d7cb95080914a45ec 100755
(executable)
--- a/
cookbooks/trac/files/default/trac-authenticate
+++ b/
cookbooks/trac/files/default/trac-authenticate
@@
-9,7
+9,9
@@
pass = gets.chop
request = Net::HTTP::Get.new("/api/0.6/user/details")
request.basic_auth user, pass
-response = Net::HTTP.new("api.openstreetmap.org").request(request)
+response = Net::HTTP.start("api.openstreetmap.org", :use_ssl => true) do |http|
+ http.request(request)
+end
exit!(0) if response.is_a?(Net::HTTPSuccess)
exit!(1)