Add option to limit the size of documents and comments

지나치게 용량이 큰 글을 등록하여 서버 과부하나 트래픽을 유발하는 경우가 있음.
예: ㅋㅋㅋ를 1000만 번쯤 복사해서 넣는다거나...

이런 문제를 막기 위해 게시판에서 글과 댓글의 용량을 제한할 수 있도록 함.
지저분한 태그가 많이 붙은 HTML 콘텐츠을 복붙하는 경우에 대비하여
기본값은 글 1024KB, 댓글 128KB로 여유있게 책정하였으며
사이트 특성에 따라 줄이면 됨.
This commit is contained in:
Kijin Sung 2018-03-07 15:51:36 +09:00
parent f11d3053f3
commit adb93006b4
4 changed files with 44 additions and 0 deletions

View file

@ -225,6 +225,20 @@
<p class="x_help-block">{$lang->about_anonymous_name}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->document_length_limit}</label>
<div class="x_controls">
<input type="number" name="document_length_limit" id="document_length_limit" value="{$module_info->document_length_limit ?: 1024}" /> KB
<p class="x_help-block">{$lang->about_document_length_limit}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->comment_length_limit}</label>
<div class="x_controls">
<input type="number" name="comment_length_limit" id="comment_length_limit" value="{$module_info->comment_length_limit ?: 128}" /> KB
<p class="x_help-block">{$lang->about_comment_length_limit}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->consultation}</label>
<div class="x_controls">