fix(i18n): wrap text under i18n.t

i18n(france_connect/*): replace wording with i18n

fix(lint): i18n key issue

secu(views/france_connect/particulier/merge.html.haml): sanitize france_connect_email just in case

fix(brakeman): sanitize FCI.email_france_connect when used with html_safe via an I18n.t, also add exception to brakeman
This commit is contained in:
Martin 2021-11-23 13:30:07 +01:00
parent febe890d28
commit fdf0f18fda
8 changed files with 104 additions and 38 deletions

View file

@ -1,5 +1,36 @@
{
"ignored_warnings": [
{
"warning_type": "Cross-Site Scripting",
"warning_code": 2,
"fingerprint": "42099f4550a8377f455e830e8ab645cecd5806248481c5c646b4e17548c3cb07",
"check_name": "CrossSiteScripting",
"message": "Unescaped model attribute",
"file": "app/views/france_connect/particulier/merge.html.haml",
"line": 6,
"link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
"code": "t(\".subtitle\", :email => sanitize(FranceConnectInformation.find_by(:merge_token => merge_token_params).email_france_connect), :application_name => (APPLICATION_NAME))",
"render_path": [
{
"type": "controller",
"class": "FranceConnect::ParticulierController",
"method": "merge",
"line": 48,
"file": "app/controllers/france_connect/particulier_controller.rb",
"rendered": {
"name": "france_connect/particulier/merge",
"file": "app/views/france_connect/particulier/merge.html.haml"
}
}
],
"location": {
"type": "template",
"template": "france_connect/particulier/merge"
},
"user_input": "FranceConnectInformation.find_by(:merge_token => merge_token_params).email_france_connect",
"confidence": "Weak",
"note": "explicitely sanitized even if we are using html_safe"
},
{
"warning_type": "Cross-Site Scripting",
"warning_code": 2,
@ -15,7 +46,7 @@
"type": "controller",
"class": "Users::DossiersController",
"method": "merci",
"line": 188,
"line": 193,
"file": "app/controllers/users/dossiers_controller.rb",
"rendered": {
"name": "users/dossiers/merci",
@ -58,7 +89,7 @@
"check_name": "Redirect",
"message": "Possible unprotected redirect",
"file": "app/controllers/instructeurs/procedures_controller.rb",
"line": 180,
"line": 190,
"link": "https://brakemanscanner.org/docs/warning_types/redirect/",
"code": "redirect_to(Export.find_or_create_export(params[:export_format], (params[:time_span_type] or \"everything\"), current_instructeur.groupe_instructeurs.where(:procedure => procedure)).file.service_url)",
"render_path": null,
@ -72,6 +103,6 @@
"note": ""
}
],
"updated": "2021-09-02 16:12:11 -0500",
"updated": "2021-11-23 14:09:21 +0100",
"brakeman_version": "5.1.1"
}