CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 21:43:38 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/rails/rails.git
etag: W/"ffeb8f86325559576924d28caac7a4f6"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=346Nc6RX7GHF0wtwIDKurPTwsLbSu2HiUKrJsgXLADbMEH3CACozFqSP3hU1u35yKjH6WQB0QK8qP0%2BQq0ANZAFz%2FuTSrFTdnCEdChh%2FjiHRmZnK16PxDAE8TsnayXuj1l3ryy0i6disadsKVlpIXiMLQrs175QciTSmHTV5toFiaUtBAZ3A2e11fOQ3dcylaLpf8G4d8g%2BA3phHo6JoIgEoybOkApzpZrt3A9NRKvKsoYO1trP%2B0Z8wD4jpQ7jOK0bgkUuZJAJbWzi361uKLQ%3D%3D--ytf8RF4SomUM4xh1--6RvBZaucL6KG67ba0DMvIA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1212217500.1760219017; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 21:43:37 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 21:43:37 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: CA26:14CD9D:A60262:DA8958:68EACF89
Merge the prerequisites for on-by-default XSS escaping into rails. · rails/rails@80da8eb · GitHub
Copy file name to clipboardExpand all lines: actionpack/lib/action_view.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/erb/util.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/active_record_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/asset_tag_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/capture_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/date_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_options_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_tag_helper.rb
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 22k
Commit 80da8eb
committed
Merge the prerequisites for on-by-default XSS escaping into rails.
This consists of:
* String#html_safe! a method to mark a string as 'safe'
* ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it
* Calls to String#html_safe! throughout the rails helpers
* a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB)
Note, this does *not* give you on-by-default XSS escaping in 2.3 applications. To get that you'll need to install a plugin:
https://github.com/nzkoz/rails_xss1 parent a69316b commit 80da8ebCopy full SHA for 80da8eb
File tree
Expand file treeCollapse file tree
26 files changed
+297
-30
lines changedFilter options
- actionpack
- lib
- action_view
- erb
- helpers
- test
- template
- view
- activesupport
- lib/active_support/core_ext
- string
- test/core_ext
Expand file treeCollapse file tree
26 files changed
+297
-30
lines changedCollapse file: actionpack/lib/action_view.rb
actionpack/lib/action_view.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view.rb+3-3Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 |
| - | |
55 |
| - | |
56 |
| - | |
| 55 | + | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Collapse file: actionpack/lib/action_view/erb/util.rb
actionpack/lib/action_view/erb/util.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/erb/util.rb+5Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 |
| |
22 | 27 |
| |
23 | 28 |
| |
|
Collapse file: actionpack/lib/action_view/helpers.rb
actionpack/lib/action_view/helpers.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers.rb+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| 49 | + | |
48 | 50 |
| |
49 | 51 |
| |
50 | 52 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/active_record_helper.rb
actionpack/lib/action_view/helpers/active_record_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/active_record_helper.rb+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
293 |
| - | |
| 293 | + | |
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/asset_tag_helper.rb
actionpack/lib/action_view/helpers/asset_tag_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/asset_tag_helper.rb+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
285 | 285 |
| |
286 | 286 |
| |
287 | 287 |
| |
288 |
| - | |
| 288 | + | |
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
| |||
434 | 434 |
| |
435 | 435 |
| |
436 | 436 |
| |
437 |
| - | |
| 437 | + | |
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/capture_helper.rb
actionpack/lib/action_view/helpers/capture_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/capture_helper.rb+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
127 |
| - | |
| 127 | + | |
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/date_helper.rb
actionpack/lib/action_view/helpers/date_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/date_helper.rb+3-3Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
916 | 916 |
| |
917 | 917 |
| |
918 | 918 |
| |
919 |
| - | |
| 919 | + | |
920 | 920 |
| |
921 | 921 |
| |
922 | 922 |
| |
923 |
| - | |
| 923 | + | |
924 | 924 |
| |
925 | 925 |
| |
926 | 926 |
| |
927 |
| - | |
| 927 | + | |
928 | 928 |
| |
929 | 929 |
| |
930 | 930 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/form_helper.rb
actionpack/lib/action_view/helpers/form_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_helper.rb+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 |
| - | |
| 283 | + | |
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
| |||
797 | 797 |
| |
798 | 798 |
| |
799 | 799 |
| |
800 |
| - | |
| 800 | + | |
801 | 801 |
| |
802 | 802 |
| |
803 | 803 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/form_options_helper.rb
actionpack/lib/action_view/helpers/form_options_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_options_helper.rb+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
296 | 296 |
| |
297 | 297 |
| |
298 | 298 |
| |
299 |
| - | |
| 299 | + | |
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
|
Collapse file: actionpack/lib/action_view/helpers/form_tag_helper.rb
actionpack/lib/action_view/helpers/form_tag_helper.rb
Copy file name to clipboardExpand all lines: actionpack/lib/action_view/helpers/form_tag_helper.rb+3-3Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
432 | 432 |
| |
433 | 433 |
| |
434 | 434 |
| |
435 |
| - | |
| 435 | + | |
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
| |||
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
462 |
| - | |
| 462 | + | |
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
468 | 468 |
| |
469 |
| - | |
| 469 | + | |
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
|
You can’t perform that action at this time.
0 commit comments