aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/ujs/views
Commit message (Collapse)AuthorAgeFilesLines
* Add support for automatic nonce generation for Rails UJSAndrew White2018-02-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Because the UJS library creates a script tag to process responses it normally requires the script-src attribute of the content security policy to include 'unsafe-inline'. To work around this we generate a per-request nonce value that is embedded in a meta tag in a similar fashion to how CSRF protection embeds its token in a meta tag. The UJS library can then read the nonce value and set it on the dynamically generated script tag to enable it to execute without needing 'unsafe-inline' enabled. Nonce generation isn't 100% safe - if your script tag is including user generated content in someway then it may be possible to exploit an XSS vulnerability which can take advantage of the nonce. It is however an improvement on a blanket permission for inline scripts. It is also possible to use the nonce within your own script tags by using `nonce: true` to set the nonce value on the tag, e.g <%= javascript_tag nonce: true do %> alert('Hello, World!'); <% end %> Fixes #31689.
* Enable to call Rails.ajax without beforeSendta1kt0me2017-10-281-1/+1
|
* Add jQuery to test vendor filesMarc Rendl Ignacio2017-07-201-1/+1
| | | | | ... so that we can run most, if not all, of rails-ujs tests without necessarily requiring an internet connection.
* Test rails-ujs in our travis matrixRafael Mendonça França2017-02-222-33/+4
|
* Import rails-ujs v0.1.0 from rails/rails-ujsGuillermo Iguaran2017-02-202-2/+2
|
* Add UJS testsGuillermo Iguaran2016-11-262-0/+65