aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/ujs/server.rb
Commit message (Collapse)AuthorAgeFilesLines
* Do not enable disabled elements for XHR redirectsPatrik Bóna2018-09-271-1/+6
| | | | Fixes #29473.
* Add support for automatic nonce generation for Rails UJSAndrew White2018-02-191-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Test rails-ujs in our travis matrixRafael Mendonça França2017-02-221-35/+2
|
* Fix Rubocop violations and fix documentation visibilityRafael Mendonça França2016-12-281-13/+13
| | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API.
* stop using removed `render :text`yuuji.yaginuma2016-12-031-1/+1
| | | | Follow up to 79a5ea9eadb4d43b62afacedc0706cbe88c54496
* Add UJS testsGuillermo Iguaran2016-11-261-0/+105