secure_headers 6.1.0 → 6.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.
Potentially problematic release.
This version of secure_headers might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/secure_headers/headers/content_security_policy.rb +2 -1
- data/lib/secure_headers/headers/content_security_policy_config.rb +1 -0
- data/lib/secure_headers/headers/policy_management.rb +2 -1
- data/lib/secure_headers/version.rb +3 -1
- data/secure_headers.gemspec +2 -2
- data/spec/lib/secure_headers/headers/content_security_policy_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7de332e0980c748038f72b7775399f65556521cf37b4392665fdd11a5192df3b
|
4
|
+
data.tar.gz: a6bea34afe4962462f0a263fd7728fa659ec65c15f8cfbca94c4639bc6452d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fcad5939d9cb914adf56965624b4620b9b7146fc0d5cc5ca9a1741f257c6884bd16c940805ac260e7cb3c7752411caae94b84c2bf8f7730d21c35ce3fa5702d
|
7
|
+
data.tar.gz: 505e0e2907f8eb9f452c3ae6d14a32bf224de7a2f73de41e8903679f586e4cc4e0fed7a6e6c240a7822cb04050ef30165f552363bc63edda6d258743341f3054
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
+
## 6.1.1
|
2
|
+
|
3
|
+
Adds the ability to disable the automatically-appended `'unsafe-inline'` value when nonces are used #404 (@will)
|
4
|
+
|
1
5
|
## 6.1
|
2
6
|
|
3
7
|
Adds support for navigate-to, prefetch-src, and require-sri-for #395
|
4
8
|
|
9
|
+
NOTE: this version is a breaking change due to the removal of HPKP. Remove the HPKP config, the standard is dead. Apologies for not doing a proper deprecate/major rev cycle :pray:
|
10
|
+
|
5
11
|
## 6.0
|
6
12
|
|
7
13
|
- See the [upgrading to 6.0](docs/upgrading-to-6-0.md) guide for the breaking changes.
|
@@ -179,7 +179,8 @@ module SecureHeaders
|
|
179
179
|
# unsafe-inline, this is more concise.
|
180
180
|
def append_nonce(source_list, nonce)
|
181
181
|
if nonce
|
182
|
-
source_list.push("'nonce-#{nonce}'"
|
182
|
+
source_list.push("'nonce-#{nonce}'")
|
183
|
+
source_list.push(UNSAFE_INLINE) unless @config[:disable_nonce_backwards_compatibility]
|
183
184
|
end
|
184
185
|
|
185
186
|
source_list
|
data/secure_headers.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path("../lib", __FILE__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require "secure_headers/version"
|
4
6
|
|
5
|
-
# -*- encoding: utf-8 -*-
|
6
|
-
# frozen_string_literal: true
|
7
7
|
Gem::Specification.new do |gem|
|
8
8
|
gem.name = "secure_headers"
|
9
9
|
gem.version = SecureHeaders::VERSION
|
@@ -145,6 +145,11 @@ module SecureHeaders
|
|
145
145
|
csp = ContentSecurityPolicy.new({default_src: %w('self'), script_src: [ContentSecurityPolicy::STRICT_DYNAMIC], script_nonce: 123456})
|
146
146
|
expect(csp.value).to eq("default-src 'self'; script-src 'strict-dynamic' 'nonce-123456' 'unsafe-inline'")
|
147
147
|
end
|
148
|
+
|
149
|
+
it "supports strict-dynamic and opting out of the appended 'unsafe-inline'" do
|
150
|
+
csp = ContentSecurityPolicy.new({default_src: %w('self'), script_src: [ContentSecurityPolicy::STRICT_DYNAMIC], script_nonce: 123456, disable_nonce_backwards_compatibility: true })
|
151
|
+
expect(csp.value).to eq("default-src 'self'; script-src 'strict-dynamic' 'nonce-123456'")
|
152
|
+
end
|
148
153
|
end
|
149
154
|
end
|
150
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secure_headers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Matatall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|