Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#2052] Fix stored XSS in Notifications
- Loading branch information
1 parent
cabb944
commit 720a470
Showing
6 changed files
with
136 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,17 @@ | ||
| # frozen_string_literal: true | ||
| data = { | ||
| cutoff: false, | ||
| user: 'Julia Nguyen', | ||
| comment: 'Hello', | ||
| typename: 'typename', | ||
| type: 'type_comment_moment', | ||
| typeid: 1, | ||
| commentable_id: 1 | ||
| } | ||
|
|
||
| FactoryBot.define do | ||
| factory :notification do | ||
| data = { | ||
| cutoff: false, | ||
| user: 'Almond Butters', | ||
| comment: 'Hello', | ||
| typename: 'typename', | ||
| type: 'type_comment_moment', | ||
| typeid: 1, | ||
| commentable_id: 1, | ||
| } | ||
| uniqueid { 'MyString' } | ||
| data { data.to_json } | ||
| user_id { 1 } | ||
|
|
||
| trait :with_user do | ||
| association :user, factory: :user | ||
| end | ||
| end | ||
| end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters