geminabox 4.1.0 → 4.1.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ba631efd6619a144c24a0ea39b1bc580fdcdd3ddb868988708353fa34f8ff13
|
|
4
|
+
data.tar.gz: 9aa5fbe6e570c477e84bf362df1c2d790b2f4809a537e696353e0aac67414c7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e23c6674441cb09c7b9a869cb2cb9d617b080278191f2e7ce4cb49e64e81d310e01a294fe14c3162ce34668eadef49c9092ca31c2c161d6e094a1837511d0e9
|
|
7
|
+
data.tar.gz: a6e548b70fdfd5b4bc9b42ea43ab295d947bac989e694be8607e7c913e350110d66701e9aa6017b0f44b18b8a2b16f5a796bdbfe0c982329fa405769dfbfea8a
|
|
@@ -40,8 +40,8 @@ module Geminabox
|
|
|
40
40
|
private
|
|
41
41
|
|
|
42
42
|
def configure_tls(ssl_config)
|
|
43
|
-
# httpclient otherwise trusts only its own bundled CA file (
|
|
44
|
-
# without Let's Encrypt's root) and ignores SSL_CERT_FILE.
|
|
43
|
+
# httpclient otherwise trusts only its own bundled CA file (before 2.10,
|
|
44
|
+
# a 2015 one without Let's Encrypt's root) and ignores SSL_CERT_FILE.
|
|
45
45
|
ssl_config.set_default_paths
|
|
46
46
|
ssl_config.add_trust_ca(rubygems_ssl_ca_cert) if rubygems_ssl_ca_cert
|
|
47
47
|
cert, key = rubygems_ssl_client_cert
|
|
@@ -80,6 +80,8 @@ module Geminabox
|
|
|
80
80
|
# memory and allows up to 10 MiB of it, once per upload and again on every
|
|
81
81
|
# full reindex, so the cap is checked before anything is parsed. RubyGems
|
|
82
82
|
# parses every metadata entry, so all of them are measured.
|
|
83
|
+
# checksums.yaml.gz is YAML-parsed the same way, before the spec, so it
|
|
84
|
+
# gets the same cap; a real one is a few hundred bytes.
|
|
83
85
|
def metadata_within_limit?
|
|
84
86
|
limit = Geminabox.max_metadata_size
|
|
85
87
|
return true if limit.nil?
|
|
@@ -91,7 +93,7 @@ module Geminabox
|
|
|
91
93
|
case entry.full_name
|
|
92
94
|
when "metadata"
|
|
93
95
|
return false if entry.size > limit
|
|
94
|
-
when "metadata.gz"
|
|
96
|
+
when "metadata.gz", "checksums.yaml.gz"
|
|
95
97
|
return false unless inflates_within?(entry, limit)
|
|
96
98
|
end
|
|
97
99
|
end
|
data/lib/geminabox/version.rb
CHANGED