Skip to content

Commit 40674a3

Browse files
authored
fix: Fix typos (#546)
2 parents 33d6461 + 8cafd03 commit 40674a3

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ NOTE: this version is a breaking change due to the removal of HPKP. Remove the H
7070

7171
## 5.0.0
7272

73-
Well this is a little embarassing. 4.0 was supposed to set the secure/httponly/samesite=lax attributes on cookies by default but it didn't. Now it does. - See the [upgrading to 5.0](docs/upgrading-to-5-0.md) guide.
73+
Well this is a little embarrassing. 4.0 was supposed to set the secure/httponly/samesite=lax attributes on cookies by default but it didn't. Now it does. - See the [upgrading to 5.0](docs/upgrading-to-5-0.md) guide.
7474

7575
## 4.0.1
7676

@@ -194,7 +194,7 @@ end
194194

195195
## 3.4.0 the frame-src/child-src transition for Firefox.
196196

197-
Handle the `child-src`/`frame-src` transition semi-intelligently across versions. I think the code best descibes the behavior here:
197+
Handle the `child-src`/`frame-src` transition semi-intelligently across versions. I think the code best describes the behavior here:
198198

199199
```ruby
200200
if supported_directives.include?(:child_src)

lib/secure_headers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def content_security_policy_style_nonce(request)
178178
content_security_policy_nonce(request, ContentSecurityPolicy::STYLE_SRC)
179179
end
180180

181-
# Public: Retreives the config for a given header type:
181+
# Public: Retrieves the config for a given header type:
182182
#
183183
# Checks to see if there is an override for this request, then
184184
# Checks to see if a named override is used for this request, then

lib/secure_headers/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def default(&block)
3535

3636
# Public: create a named configuration that overrides the default config.
3737
#
38-
# name - use an idenfier for the override config.
38+
# name - use an identifier for the override config.
3939
# base - override another existing config, or override the default config
4040
# if no value is supplied.
4141
#

lib/secure_headers/headers/content_security_policy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def build_sandbox_list_directive(directive)
7979
end
8080

8181
# A maximally strict sandbox policy is just the `sandbox` directive,
82-
# whith no configuraiton values.
82+
# with no configuration values.
8383
if max_strict_policy
8484
symbol_to_hyphen_case(directive)
8585
elsif sandbox_list && sandbox_list.any?
@@ -120,7 +120,7 @@ def build_source_list_directive(directive)
120120
end
121121

122122
# If a directive contains *, all other values are omitted.
123-
# If a directive contains 'none' but has other values, 'none' is ommitted.
123+
# If a directive contains 'none' but has other values, 'none' is omitted.
124124
# Schemes are stripped (see http://www.w3.org/TR/CSP2/#match-source-expression)
125125
def minify_source_list(directive, source_list)
126126
source_list = source_list.compact

lib/secure_headers/headers/policy_management.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def make_header(config)
201201

202202
# Public: Validates each source expression.
203203
#
204-
# Does not validate the invididual values of the source expression (e.g.
204+
# Does not validate the individual values of the source expression (e.g.
205205
# script_src => h*t*t*p: will not raise an exception)
206206
def validate_config!(config)
207207
return if config.nil? || config.opt_out?
@@ -402,7 +402,7 @@ def validate_require_trusted_types_for_source_expression!(directive, require_tru
402402
# 1. is an array of strings
403403
# 2. does not contain any deprecated, now invalid values (inline, eval, self, none)
404404
#
405-
# Does not validate the invididual values of the source expression (e.g.
405+
# Does not validate the individual values of the source expression (e.g.
406406
# script_src => h*t*t*p: will not raise an exception)
407407
def validate_source_expression!(directive, source_expression)
408408
if source_expression != OPT_OUT

spec/lib/secure_headers/headers/x_permitted_cross_domain_policies_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module SecureHeaders
3737
end
3838
end
3939

40-
context "invlaid configuration values" do
40+
context "invalid configuration values" do
4141
it "doesn't accept invalid values" do
4242
expect do
4343
XPermittedCrossDomainPolicies.validate_config!("open")

spec/lib/secure_headers_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ module SecureHeaders
226226
expect(hash[ContentSecurityPolicyConfig::HEADER_NAME]).to eq("default-src 'none'; script-src 'self'")
227227
end
228228

229-
it "overrides non-existant directives" do
229+
it "overrides non-existent directives" do
230230
Configuration.default do |config|
231231
config.csp = {
232232
default_src: %w(https:),

0 commit comments

Comments
 (0)