Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

未知の攻撃パターンのためにエスケープ処理を付与 #535

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions data/Smarty/templates/admin/basis/delivery.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@
<tr>
<td><!--{$arrDelivList[cnt].name|h}--></td>
<td><!--{$arrDelivList[cnt].service_name|h}--></td>
<td align="center"><a href="?" onclick="eccube.changeAction('./delivery_input.php'); eccube.setModeAndSubmit('pre_edit', 'deliv_id', <!--{$arrDelivList[cnt].deliv_id}-->); return false;">
<td align="center"><a href="?" onclick="eccube.changeAction('./delivery_input.php'); eccube.setModeAndSubmit('pre_edit', 'deliv_id', <!--{$arrDelivList[cnt].deliv_id|h}-->); return false;">
編集</a></td>
<td align="center"><a href="?" onclick="eccube.setModeAndSubmit('delete', 'deliv_id', <!--{$arrDelivList[cnt].deliv_id}-->); return false;">
<td align="center"><a href="?" onclick="eccube.setModeAndSubmit('delete', 'deliv_id', <!--{$arrDelivList[cnt].deliv_id|h}-->); return false;">
削除</a></td>
<td align="center">
<!--{if $smarty.section.cnt.iteration != 1}-->
<a href="?" onclick="eccube.setModeAndSubmit('up','deliv_id', '<!--{$arrDelivList[cnt].deliv_id}-->'); return false;">上へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('up','deliv_id', '<!--{$arrDelivList[cnt].deliv_id|h}-->'); return false;">上へ</a>
<!--{/if}-->
<!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
<a href="?" onclick="eccube.setModeAndSubmit('down','deliv_id', '<!--{$arrDelivList[cnt].deliv_id}-->'); return false;">下へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('down','deliv_id', '<!--{$arrDelivList[cnt].deliv_id|h}-->'); return false;">下へ</a>
<!--{/if}-->
</td>
</tr>
Expand Down
10 changes: 5 additions & 5 deletions data/Smarty/templates/admin/basis/holiday.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<form name="form1" id="form1" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="edit" />
<input type="hidden" name="holiday_id" value="<!--{$tpl_holiday_id}-->" />
<input type="hidden" name="holiday_id" value="<!--{$tpl_holiday_id|h}-->" />
<div id="basis" class="contents-main">

<table class="form">
Expand Down Expand Up @@ -85,7 +85,7 @@
<td><!--{$arrHoliday[cnt].month|h}-->月<!--{$arrHoliday[cnt].day|h}-->日</td>
<td class="center">
<!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">編集</a>
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id|h}-->); return false;">編集</a>
<!--{else}-->
編集中
<!--{/if}-->
Expand All @@ -94,15 +94,15 @@
<!--{if $arrClassCatCount[$class_id] > 0}-->
-
<!--{else}-->
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">削除</a>
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id|h}-->); return false;">削除</a>
<!--{/if}-->
</td>
<td class="center">
<!--{if $smarty.section.cnt.iteration != 1}-->
<a href="?" onclick="eccube.setModeAndSubmit('up', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">上へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('up', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id|h}-->); return false;">上へ</a>
<!--{/if}-->
<!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
<a href="?" onclick="eccube.setModeAndSubmit('down', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">下へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('down', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id|h}-->); return false;">下へ</a>
<!--{/if}-->
</td>
</tr>
Expand Down
10 changes: 5 additions & 5 deletions data/Smarty/templates/admin/basis/kiyaku.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<form name="form1" id="form1" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="edit" />
<input type="hidden" name="kiyaku_id" value="<!--{$tpl_kiyaku_id}-->" />
<input type="hidden" name="kiyaku_id" value="<!--{$tpl_kiyaku_id|h}-->" />
<div id="basis" class="contents-main">
<table class="form">
<tr>
Expand Down Expand Up @@ -69,7 +69,7 @@
<td><!--{* 規格名 *}--><!--{$arrKiyaku[cnt].kiyaku_title|h}--></td>
<td align="center">
<!--{if $tpl_kiyaku_id != $arrKiyaku[cnt].kiyaku_id}-->
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id}-->); return false;">編集</a>
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id|h}-->); return false;">編集</a>
<!--{else}-->
編集中
<!--{/if}-->
Expand All @@ -78,15 +78,15 @@
<!--{if $arrClassCatCount[$class_id] > 0}-->
-
<!--{else}-->
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id}-->); return false;">削除</a>
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id|h}-->); return false;">削除</a>
<!--{/if}-->
</td>
<td align="center">
<!--{if $smarty.section.cnt.iteration != 1}-->
<a href="?" onclick="eccube.setModeAndSubmit('up', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id}-->); return false;">上へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('up', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id|h}-->); return false;">上へ</a>
<!--{/if}-->
<!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
<a href="?" onclick="eccube.setModeAndSubmit('down', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id}-->); return false;">下へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('down', 'kiyaku_id', <!--{$arrKiyaku[cnt].kiyaku_id|h}-->); return false;">下へ</a>
<!--{/if}-->
</td>
</tr>
Expand Down
10 changes: 5 additions & 5 deletions data/Smarty/templates/admin/basis/payment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<form name="form1" id="form1" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="edit" />
<input type="hidden" name="payment_id" value="<!--{$tpl_payment_id}-->" />
<input type="hidden" name="payment_id" value="<!--{$tpl_payment_id|h}-->" />
<div id="basis" class="contents-main">
<div class="btn">
<ul>
Expand Down Expand Up @@ -62,14 +62,14 @@
<td class="center">
<!--{if $arrPaymentListFree[cnt].rule_max > 0}--><!--{$arrPaymentListFree[cnt].rule_max|n2s|h}--><!--{else}-->0<!--{/if}-->円
<!--{if $arrPaymentListFree[cnt].upper_rule > 0}-->~<!--{$arrPaymentListFree[cnt].upper_rule|n2s|h}-->円<!--{elseif $arrPaymentListFree[cnt].upper_rule == "0"}--><!--{else}-->~無制限<!--{/if}--></td>
<td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="eccube.changeAction('./payment_input.php'); eccube.setModeAndSubmit('pre_edit', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">編集</a><!--{else}-->-<!--{/if}--></td>
<td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="eccube.setModeAndSubmit('delete', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">削除</a><!--{else}-->-<!--{/if}--></td>
<td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="eccube.changeAction('./payment_input.php'); eccube.setModeAndSubmit('pre_edit', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id|h}-->); return false;">編集</a><!--{else}-->-<!--{/if}--></td>
<td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="eccube.setModeAndSubmit('delete', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id|h}-->); return false;">削除</a><!--{else}-->-<!--{/if}--></td>
<td class="center">
<!--{if $smarty.section.cnt.iteration != 1}-->
<a href="?" onclick="eccube.setModeAndSubmit('up','payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">上へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('up','payment_id', <!--{$arrPaymentListFree[cnt].payment_id|h}-->); return false;">上へ</a>
<!--{/if}-->
<!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
<a href="?" onclick="eccube.setModeAndSubmit('down','payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">下へ</a>
<a href="?" onclick="eccube.setModeAndSubmit('down','payment_id', <!--{$arrPaymentListFree[cnt].payment_id|h}-->); return false;">下へ</a>
<!--{/if}-->
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions data/Smarty/templates/admin/basis/payment_input.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
<!--{assign var=key value="payment_image"}-->
<span class="attention"><!--{$arrErr[$key]}--></span>
<!--{if $arrFile[$key].filepath != ""}-->
<img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrForm.name|h}-->"> <br /><a href="" onclick="eccube.setModeAndSubmit('delete_image', 'image_key', '<!--{$key}-->'); return false;">[画像の取り消し]</a><br />
<img src="<!--{$arrFile[$key].filepath|h}-->" alt="<!--{$arrForm.name|h}-->"> <br /><a href="" onclick="eccube.setModeAndSubmit('delete_image', 'image_key', '<!--{$key|h}-->'); return false;">[画像の取り消し]</a><br />
<!--{/if}-->
<input type="file" name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" />
<a class="btn-normal" href="javascript:;" name="btn" onclick="eccube.setModeAndSubmit('upload_image', 'image_key', '<!--{$key}-->'); return false;">アップロード</a>
<input type="file" name="<!--{$key|h}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" />
<a class="btn-normal" href="javascript:;" name="btn" onclick="eccube.setModeAndSubmit('upload_image', 'image_key', '<!--{$key|h}-->'); return false;">アップロード</a>
</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/basis/point.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<form name="point_form" id="point_form" method="post" action="">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="<!--{$tpl_mode}-->" />
<input type="hidden" name="mode" value="<!--{$tpl_mode|h}-->" />
<div id="basis" class="contents-main">
<table>
<tr>
Expand All @@ -51,7 +51,7 @@

<div class="btn-area">
<ul>
<li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('point_form', '<!--{$tpl_mode}-->', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
<li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('point_form', '<!--{$tpl_mode|h}-->', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/basis/tax.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
</td>
<td class="center">
<!--{if $tpl_tax_rule_id != $arrTaxrule[cnt].tax_rule_id}-->
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'tax_rule_id', '<!--{$arrTaxrule[cnt].tax_rule_id}-->'); return false;">編集</a>
<a href="?" onclick="eccube.setModeAndSubmit('pre_edit', 'tax_rule_id', '<!--{$arrTaxrule[cnt].tax_rule_id|h}-->'); return false;">編集</a>
<!--{else}-->
編集中
<!--{/if}-->
Expand All @@ -135,7 +135,7 @@
<!--{if $arrTaxrule[cnt].tax_rule_id == 0}-->
-
<!--{else}-->
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'tax_rule_id', '<!--{$arrTaxrule[cnt].tax_rule_id}-->'); return false;">削除</a>
<a href="?" onclick="eccube.setModeAndSubmit('delete', 'tax_rule_id', '<!--{$arrTaxrule[cnt].tax_rule_id|h}-->'); return false;">削除</a>
<!--{/if}-->
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/basis/tradelaw.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<form name="form1" id="form1" method="post" action="">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="<!--{$tpl_mode}-->" />
<input type="hidden" name="mode" value="<!--{$tpl_mode|h}-->" />
<div id="basis" class="contents-main">
<table class="form">
<tr>
Expand Down Expand Up @@ -197,7 +197,7 @@

<div class="btn-area">
<ul>
<li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('form1', '<!--{$tpl_mode}-->', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
<li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('form1', '<!--{$tpl_mode|h}-->', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/contents/csv_sql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function fnTargetSelf(){
</td>
<td>
<div class="btn">
<a class="btn-normal" href="javascript:;" name='csv' onclick="fnTargetSelf(); eccube.fnFormModeSubmit('form1','csv_output','csv_output_id',<!--{$item.sql_id}-->); return false;"><span>CSV出力</span></a>
<a class="btn-normal" href="javascript:;" name='del' onclick="fnTargetSelf(); eccube.fnFormModeSubmit('form1','delete','sql_id',<!--{$item.sql_id}-->); return false;"><span>削除</span></a>
<a class="btn-normal" href="javascript:;" name='csv' onclick="fnTargetSelf(); eccube.fnFormModeSubmit('form1','csv_output','csv_output_id',<!--{$item.sql_id|h}-->); return false;"><span>CSV出力</span></a>
<a class="btn-normal" href="javascript:;" name='del' onclick="fnTargetSelf(); eccube.fnFormModeSubmit('form1','delete','sql_id',<!--{$item.sql_id|h}-->); return false;"><span>削除</span></a>
</div>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/contents/file_manager.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script type="text/javascript">//<![CDATA[
$(function() {
var bread_crumbs = <!--{$tpl_now_dir}-->;
var file_path = '<!--{$tpl_file_path}-->';
var file_path = '<!--{$tpl_file_path|h}-->';
var $delimiter = '<span>&nbsp;&gt;&nbsp;</span>';
var $node = $('h2');
var total = bread_crumbs.length;
Expand Down Expand Up @@ -114,7 +114,7 @@
</td>
<!--{if $arrFileList[cnt].is_dir}-->
<td class="center">
<a href="javascript:;" onclick="eccube.setValue('tree_select_file', '<!--{$arrFileList[cnt].file_path}-->', 'form1'); eccube.fileManager.selectFile('<!--{$id}-->', '#808080');eccube.setModeAndSubmit('move','',''); return false;">表示</a>
<a href="javascript:;" onclick="eccube.setValue('tree_select_file', '<!--{$arrFileList[cnt].file_path|h}-->', 'form1'); eccube.fileManager.selectFile('<!--{$id|h}-->', '#808080');eccube.setModeAndSubmit('move','',''); return false;">表示</a>
</td>
<!--{else}-->
<td class="center">
Expand Down
4 changes: 2 additions & 2 deletions data/Smarty/templates/admin/contents/recommend.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ function lfnSortItem(mode,data,form){
<td>
<!--{* 移動 *}-->
<!--{if $smarty.section.cnt.iteration != 1 && $arrItems[$smarty.section.cnt.iteration].best_id}-->
<a href="?" onclick="lfnSortItem('up',<!--{$arrItems[$smarty.section.cnt.iteration].best_id}-->,'form<!--{$smarty.section.cnt.iteration-1}-->'); return false;">上へ</a><br />&nbsp;
<a href="?" onclick="lfnSortItem('up',<!--{$arrItems[$smarty.section.cnt.iteration].best_id|h}-->,'form<!--{$smarty.section.cnt.iteration-1}-->'); return false;">上へ</a><br />&nbsp;
<!--{/if}-->
<!--{if $smarty.section.cnt.iteration != $tpl_disp_max && $arrItems[$smarty.section.cnt.iteration].best_id}-->
<a href="?" onclick="lfnSortItem('down',<!--{$arrItems[$smarty.section.cnt.iteration].best_id}-->,'form<!--{$smarty.section.cnt.iteration+1}-->'); return false;">下へ</a>
<a href="?" onclick="lfnSortItem('down',<!--{$arrItems[$smarty.section.cnt.iteration].best_id|h}-->,'form<!--{$smarty.section.cnt.iteration+1}-->'); return false;">下へ</a>
<!--{/if}-->
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions data/Smarty/templates/admin/contents/recommend_search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ function func_submit( id ){
</tr>
<tr>
<th>商品コード</th>
<td><input type="text" name="search_product_code" value="<!--{$arrForm.search_product_code}-->" size="35" class="box35" /></td>
<td><input type="text" name="search_product_code" value="<!--{$arrForm.search_product_code|h}-->" size="35" class="box35" /></td>
</tr>
<tr>
<th>商品名</th>
<td><input type="text" name="search_name" value="<!--{$arrForm.search_name}-->" size="35" class="box35" /></td>
<td><input type="text" name="search_name" value="<!--{$arrForm.search_name|h}-->" size="35" class="box35" /></td>
</tr>
<tr>
<th>商品ステータス</th>
Expand Down Expand Up @@ -114,7 +114,7 @@ function func_submit( id ){
<!--{/if}-->
</td>
<td><!--{$arr.name|h}--></td>
<td class="center"><a href="" onclick="return func_submit(<!--{$arr.product_id}-->)">決定</a></td>
<td class="center"><a href="" onclick="return func_submit(<!--{$arr.product_id|h}-->)">決定</a></td>
</tr>
<!--▲商品<!--{$smarty.foreach.loop.iteration}-->-->
<!--{/foreach}-->
Expand Down
Loading