Changelog History
Page 6
-
v2.4.3 Changes
October 23, 2015@igrep reported an anti-patter in use regarding UserAgentParser. This caused UserAgentParser to reload it's entire configuration set twice* per request. Moving this to a cached constant prevents the constant reinstantiation and will improve performance.
-
v2.4.2 Changes
October 20, 2015๐ A nasty regression meant that many CSP configuration values were "reset" after the first request, one of these being the "enforce" flag. See https://github.com/twitter/secureheaders/pull/184 for the full list of fields that were affected. Thanks to @spdawson for reporting this https://github.com/twitter/secureheaders/issues/183
-
v2.4.1 Changes
October 14, 2015๐ This release may change the output of headers based on per browser support. Unsupported directives will be omitted based on the user agent per request. See https://github.com/twitter/secureheaders/pull/179
๐ p.s. this will likely be the last non-bugfix release for the 2.x line. 3.x will be a major change. Sneak preview: https://github.com/twitter/secureheaders/pull/181
-
v2.4.0 Changes
October 01, 2015โก๏ธ If you leveraged
secure_headers
automatic filling of empty directives, the header value will change but it should not affect how the browser applies the policy. The content of CSP reports may change if you do not update your policy.before
config.csp = { :default_src => "'self'" }
0๏ธโฃ would produce
default-src 'self'; connect-src 'self'; frame-src 'self' ... etc.
after
config.csp = { :default_src => "'self'" }
0๏ธโฃ will produce
default-src 'self'
0๏ธโฃ The reason for this is that a
default-src
violation was basically impossible to handle. Chrome sends aneffective-directive
which helps indicate what kind of violation occurred even if it fell back todefault-src
. This is part of the CSP Level 2 spec so hopefully other browsers will implement this soon.โช Workaround
0๏ธโฃ Just set the values yourself, but really a
default-src
of anything other than'none'
implies the policy can be tightened dramatically. "ZOMG don't you work for github and doesn't github send adefault-src
of*
???" Yes, this is true. I disagree with this but at the same time, github defines every single known directive that a browser supports sodefault-src
will only apply if a new directive is introduced, and we'd rather fail open. For now.config.csp = { :default_src => "'self'", :connect_src => "'self'", :frame_src => "'self'" ... etc. }
๐ Besides, relying on
default-src
is often not what you want and encourages an overly permissive policy. I've seen it. Seriously.default-src 'unsafe-inline' 'unsafe-eval' https: http:;
That's terrible. -
v2.3.0 Changes
September 30, 2015๐ See https://github.com/twitter/secureheaders/issues/167 and https://github.com/twitter/secureheaders/pull/168
๐ tl;dr is that there is a class method
SecureHeaders::header_hash
that will return a hash of header name => value pairs useful for merging with the rack header hash in middleware. -
v2.2.4 Changes
August 26, 2015As discussed in https://github.com/twitter/secureheaders/issues/154
-
v2.2.3 Changes
August 14, 2015 -
v2.2.2 Changes
July 02, 2015๐ See https://github.com/twitter/secureheaders/pull/147
๐ Allows you to override a controller method that returns a config in the context of the executing action.
-
v2.2.1 Changes
June 24, 2015๐ See https://github.com/twitter/secureheaders/pull/150
โ Safari will generate a warning that it doesn't support nonces. Safari will fall back to the
unsafe-inline
. Things will still work, but an ugly message is printed to the console.This opts out safari and IE users from the inline script protection. I haven't verified any IE behavior yet, so I'm just assuming it doesn't work.
-
v2.2.0 Changes
June 18, 2015https://github.com/twitter/secureheaders/pull/148
๐ Facilitates better per-request config:
:enforce => lambda { |controller| controller.current_user.beta_testing? }
NOTE if you used
lambda
config values, this will raise an exception until you add the controller reference:bad:
lambda { true }
good:
lambda { |controller| true }
proc { true }
proc { |controller| true }