Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

[v2.x] add nonce to the script tag for unsafe-inline #194

Merged
merged 3 commits into from
Oct 3, 2017

Conversation

kumarrishav
Copy link
Contributor

Fix: #193

@kumarrishav
Copy link
Contributor Author

@linkRace review?

@linkRace
Copy link

This would be the general idea, yes. Just curious where the nonce would get added to the data attribute.

@kumarrishav
Copy link
Contributor Author

kumarrishav commented Sep 19, 2017

@linkRace yup it will. part of data objectnonce: 'XCOuVO2tFc4PeKhx0ZlWWfABwsLjnzRaIhim3iTFLRZ2IUCB', _csrf: 'cZzTfhRzUK97Zj0qHI0V3p8R8iOQgUflcAS9g=',
Similar way we have context, locale too in data object.

I checked in the console.log of data

@kumarrishav
Copy link
Contributor Author

@kumarrishav kumarrishav changed the title add nonce to the script tag for unsafe-inline add nonce to the script tag for unsafe-inline on v2.x Sep 19, 2017
@kumarrishav kumarrishav changed the title add nonce to the script tag for unsafe-inline on v2.x [v2.x] add nonce to the script tag for unsafe-inline Sep 19, 2017
@kumarrishav
Copy link
Contributor Author

so, all the props of kraken comes into react-engine via options arg which get merged into data https://github.com/kumarrishav/react-engine/blob/aea30c81ddee4a163ace234db4d96c066efdae39/lib/server.js#L71
. i will replace data with options which makes more sense :).

@samsel
Copy link
Contributor

samsel commented Sep 21, 2017

just curious, are you still using v2?

@kumarrishav
Copy link
Contributor Author

kumarrishav commented Sep 21, 2017

yeah, when the project was started v2.x was available that time. Probably this quarter we might do the update.

added nonce info to README
@kumarrishav
Copy link
Contributor Author

@samsel done.

@samsel samsel merged commit c8c4ed7 into paypal:v2.x Oct 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants