Closed aredridel closed 8 years ago
oh dang, you're right. that's my fault.
so, my thought to fix this is i deprecate the version of blankie that added nonces and republish under a new major. in addition to that i'll add to the documentation that unsafe-inline
doesn't work when nonces are enabled. i'll also add a check to the joi validator that will prevent users from accidentally setting both options.
i do feel like nonces should stay enabled by default, so i'll be leaving that alone. seems to make more sense (to me, at least) to require users to explicitly disable them where they're using unsafe-inline
.
sound ok to you?
Yeah, that makes sense!
Mere deprecation won't fix it -- npm will still resolve to deprecated versions. I'd publish a version with that reverted under the old major (1.3.0? 1.2.x?) and then make the one with it as 2.0.0.
or, smallest change: make the default false in 1.x, and true in 2.x
ok, done
generateNonces
defaulting to false
(not 1.3.0 because i forgot to update the readme and i was too lazy to fix tags)generateNonces
defaulting to true
and scriptSrc
not allowing 'unsafe-inline'
when generateNonces
is true
next major version will be finally updating this thing to es6!
Oh awesome! Thank you! We rolled out our workaround this morning, and will probably roll out 2.0.0 shortly.
Upgrading to blankie supporting nonces, since they're emitted by default, this makes
unsafe-inline
no longer function due to the restrictions on script-src and style-src with nonces present, so upgrading to this version of the module will disable previously workingunsafe-inline
.