Skip to content

Commit 7b8165e

Browse files
committed
refactor(jdma): Drop the now-unused Procedure#monavis_embed_html_source
Both callers are gone: the merci page and the email block now go through MonAvisEmbed, which extracts the link instead of reinjecting the admin's markup. The brakeman entry that silenced the XSS warning on this method goes with it. Left behind it would keep ignoring a fingerprint nothing produces, and would mask a future unescaped attribute in _merci.
1 parent a0e593a commit 7b8165e

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

app/models/procedure.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,6 @@ def reset_closing_params
788788
update!(closing_reason: nil, closing_details: nil, replaced_by_procedure_id: nil, closing_notification_brouillon: false, closing_notification_en_cours: false)
789789
end
790790

791-
def monavis_embed_html_source(source)
792-
monavis_embed.gsub('nd_source=button', "nd_source=#{source}").gsub('<a ', '<a target="_blank" rel="noopener noreferrer" ')
793-
end
794-
795791
def mail_templates
796792
[
797793
self.passer_en_construction_email_template,

config/brakeman.ignore

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -88,50 +88,6 @@
8888
],
8989
"note": ""
9090
},
91-
{
92-
"warning_type": "Cross-Site Scripting",
93-
"warning_code": 2,
94-
"fingerprint": "7f0acb2033d71136d7c2bc75ad3b5d4cf1abb3363a60e447a1b40df6c9e47854",
95-
"check_name": "CrossSiteScripting",
96-
"message": "Unescaped model attribute",
97-
"file": "app/views/users/dossiers/_merci.html.erb",
98-
"line": 77,
99-
"link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
100-
"code": "current_user.dossiers.includes(:procedure).find(params[:id]).procedure.monavis_embed_html_source(\"site\")",
101-
"render_path": [
102-
{
103-
"type": "controller",
104-
"class": "Users::DossiersController",
105-
"method": "merci",
106-
"line": 375,
107-
"file": "app/controllers/users/dossiers_controller.rb",
108-
"rendered": {
109-
"name": "users/dossiers/merci",
110-
"file": "app/views/users/dossiers/merci.html.haml"
111-
}
112-
},
113-
{
114-
"type": "template",
115-
"name": "users/dossiers/merci",
116-
"line": 6,
117-
"file": "app/views/users/dossiers/merci.html.haml",
118-
"rendered": {
119-
"name": "users/dossiers/_merci",
120-
"file": "app/views/users/dossiers/_merci.html.erb"
121-
}
122-
}
123-
],
124-
"location": {
125-
"type": "template",
126-
"template": "users/dossiers/_merci"
127-
},
128-
"user_input": "current_user.dossiers.includes(:procedure)",
129-
"confidence": "Weak",
130-
"cwe_id": [
131-
79
132-
],
133-
"note": ""
134-
},
13591
{
13692
"warning_type": "Remote Code Execution",
13793
"warning_code": 25,

0 commit comments

Comments
 (0)