Ticket #21839

HTML のエスケープ漏れ対応

Date d'ouverture: 2010-05-21 08:59 Dernière mise à jour: 2010-08-05 16:54

Rapporteur:
Propriétaire:
Type:
État:
Ouvert [Owner assigned]
Composant:
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Accepted
Fichier:
Aucun

Détails

何か所か HTML のエスケープ漏れがあり、XSS が可能になっているようです。

validation がかかっていないユーザ入力値について、エスケープされていない箇所を修正しました。 (tel01 は validation されているのでエスケープは不要ですが、tel02 等がエスケープされているので周りにあわせてエスケープ処理を追加しています。)

  1. diff --git a/app/views/accounts/delivery_list.html.erb b/app/views/accounts/delivery_list.html.erb
  2. index e004d78..c595939 100644
  3. --- a/app/views/accounts/delivery_list.html.erb
  4. +++ b/app/views/accounts/delivery_list.html.erb
  5. @@ -28,8 +28,8 @@
  6. <td>お届け先住所</td>
  7. <td>
  8. 〒<%= address.zipcode01 %>-<%= address.zipcode02 %><br />
  9. - <%= address.prefecture.name %><%= address.address_city %><br /><%= address.address_detail %><br />
  10. - <%= address.family_name %> <%= address.first_name %>
  11. + <%=h address.prefecture.name %><%=h address.address_city %><br /><%=h address.address_detail %><br />
  12. + <%=h address.family_name %> <%=h address.first_name %>
  13. </td>
  14. <td class="buttom">
  15. <%= link_to '変更', :action => :delivery_edit, :id => address.id %>
  16. diff --git a/app/views/accounts/delivery_list_mobile.html.erb b/app/views/accounts/delivery_list_mobile.html.erb
  17. index 817af82..13b143d 100644
  18. --- a/app/views/accounts/delivery_list_mobile.html.erb
  19. +++ b/app/views/accounts/delivery_list_mobile.html.erb
  20. @@ -16,8 +16,8 @@
  21. <%= i+1 %><br />
  22. お届け先住所<br />
  23. 〒<%= address.zipcode01 %>-<%= address.zipcode02 %><br />
  24. - <%= address.prefecture.name %><%= address.address_city %><br /><%= address.address_detail %><br />
  25. - <%= address.family_name %> <%= address.first_name %><br />
  26. + <%=h address.prefecture.name %><%=h address.address_city %><br /><%=h address.address_detail %><br />
  27. + <%=h address.family_name %> <%=h address.first_name %><br />
  28. <br />
  29. <div style="text-align:center;">
  30. <%= link_to '変更', :action => :delivery_edit, :id => address.id %>
  31. diff --git a/app/views/admin/customers/search.html.erb b/app/views/admin/customers/search.html.erb
  32. index 41470ad..53400c1 100644
  33. --- a/app/views/admin/customers/search.html.erb
  34. +++ b/app/views/admin/customers/search.html.erb
  35. @@ -46,8 +46,8 @@
  36. <td rowspan="2"><%= Customer::ACTIVATE_NAMES[c.activate.to_i] %></td>
  37. <td><%= c.id %></td>
  38. <td rowspan="2">
  39. - <%= c.full_name %>/
  40. - <%= c.full_name_kana %>
  41. + <%=h c.full_name %>/
  42. + <%=h c.full_name_kana %>
  43. </td>
  44. <td rowspan="2"><%= System::SEX_NAMES[c.sex] %></td>
  45. <td><%= c.tel_no %></td>
  46. diff --git a/app/views/questionnaires/confirm.html.erb b/app/views/questionnaires/confirm.html.erb
  47. index 420164d..35100f2 100644
  48. --- a/app/views/questionnaires/confirm.html.erb
  49. +++ b/app/views/questionnaires/confirm.html.erb
  50. @@ -97,7 +97,7 @@
  51. </tr>
  52. <tr>
  53. <th>※お電話番号</th>
  54. - <td><%= @respondent.tel01 %> - <%=h @respondent.tel02 %> - <%=h @respondent.tel03 %></td>
  55. + <td><%=h @respondent.tel01 %> - <%=h @respondent.tel02 %> - <%=h @respondent.tel03 %></td>
  56. </tr>
  57. <tr>
  58. <th>※メールアドレス</th>
  59. diff --git a/app/views/questionnaires/confirm_mobile.html.erb b/app/views/questionnaires/confirm_mobile.html.erb
  60. index adef0e1..3e67e3d 100644
  61. --- a/app/views/questionnaires/confirm_mobile.html.erb
  62. +++ b/app/views/questionnaires/confirm_mobile.html.erb
  63. @@ -65,7 +65,7 @@
  64. <%=h @respondent.prefecture_name %><%=h @respondent.address_city %><br />
  65. <%=h @respondent.address_details %><br /><br />
  66. ※お電話番号<br />
  67. - <%= @respondent.tel01 %> - <%=h @respondent.tel02 %> - <%=h @respondent.tel03 %><br /><br />
  68. + <%=h @respondent.tel01 %> - <%=h @respondent.tel02 %> - <%=h @respondent.tel03 %><br /><br />
  69. ※メールアドレス<br />
  70. <%=h @respondent.email %><br /><br />

Ticket History (2/2 Histories)

2010-05-21 08:59 Updated by: miau
  • New Ticket "HTML のエスケープ漏れ対応" created
2010-08-05 16:54 Updated by: tmatsuzawa
  • Composant Update from (Aucun) to エレコマ本体
  • Résolution Update from Aucun to Accepted
  • Propriétaire Update from (Aucun) to tmatsuzawa

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion