fix(core,board,ecommerce): 조건부 검증 결함 패밀리 일괄 수정 및 실패 안내 노출
여러 화면에서 조건부(FormRequest) 검증이 우회되거나 과도하게 제한되던 결함을 한 계열로 묶어 수정한다. - 검증 규칙 확장 필터 이름 10개를 나머지 92개와 동일 규칙으로 통일 - 설명 길이를 바이트가 아닌 글자 수로 계산(한글 오검출 해소) - 비활성 언어팩 번역 보존한 채 수정 허용 - 알림 템플릿 제목 nullable 존중, 미지원 발송 수단 저장 차단 - 일정/실행 이력 목록 조회 검증 정합 - 게시판 첨부 미사용 시 빈 확장자 통과, new_display_hours/최소 길이 0 허용, 일괄 적용 override_values 범위 검증(SSoT) - 이커머스 클레임 사유 조회 검증, 용어 정정 - 원문 i18n 키 노출 다수 해소, 저장/삭제 실패 시 사유 화면 노출 - 아이콘 크기/다크모드 대비 회귀 수정 번들 확장(모듈3·플러그인6·템플릿2·언어팩5) 버전 new-bump 및 CHANGELOG 반영, ja 언어팩 동기.
This commit is contained in:
1 parent
c001b30a87
commit
7f8fb6870f
288 files changed
+5339
-1049
No files matched your search
@@ -7,6 +7,7 @@ use App\Contracts\Repositories\ScheduleRepositoryInterface;
|
||||
use App\Enums\ScheduleResultStatus;
|
||||
use App\Enums\ScheduleTriggerType;
|
||||
use App\Enums\ScheduleType;
|
||||
use App\Exceptions\ScheduleExecutionException;
|
||||
use App\Extension\HookManager;
|
||||
use App\Models\Schedule;
|
||||
use App\Models\ScheduleHistory;
|
||||
@@ -14,6 +15,7 @@ use App\Support\OutboundUrlValidator;
|
||||
use App\Support\ScheduleCommandValidator;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -254,14 +256,14 @@ class ScheduleService
|
||||
* @param Schedule $schedule 스케줄
|
||||
* @return array 실행 결과
|
||||
*
|
||||
* @throws Exception 차단목록에 걸린 명령일 때
|
||||
* @throws ScheduleExecutionException 차단목록에 걸린 명령일 때
|
||||
*/
|
||||
private function executeArtisanCommand(Schedule $schedule): array
|
||||
{
|
||||
// 저장 시점 검증 도입 이전 데이터나 DB 직접 수정으로 들어온 값을 방어한다
|
||||
// (isUrlCallAllowed 와 동일 사유 — 실행 직전이 마지막 방어선).
|
||||
if (! ScheduleCommandValidator::isArtisanCommandAllowed($schedule->command)) {
|
||||
throw new Exception(__('schedule.artisan_not_allowed'));
|
||||
throw ScheduleExecutionException::artisanNotAllowed();
|
||||
}
|
||||
|
||||
Artisan::call($schedule->command, [], new BufferedOutput);
|
||||
@@ -278,7 +280,7 @@ class ScheduleService
|
||||
* @param Schedule $schedule 스케줄
|
||||
* @return array 실행 결과
|
||||
*
|
||||
* @throws Exception 실행 실패 시
|
||||
* @throws ScheduleExecutionException 차단목록에 걸렸거나 실행이 실패했을 때
|
||||
*/
|
||||
private function executeShellCommand(Schedule $schedule): array
|
||||
{
|
||||
@@ -287,7 +289,7 @@ class ScheduleService
|
||||
$arguments = ScheduleCommandValidator::tokenizeShellCommand($schedule->command);
|
||||
|
||||
if ($arguments === null || ! ScheduleCommandValidator::isShellCommandAllowed($schedule->command)) {
|
||||
throw new Exception(__('schedule.shell_not_allowed'));
|
||||
throw ScheduleExecutionException::shellNotAllowed();
|
||||
}
|
||||
|
||||
$timeout = $schedule->timeout ?? 60;
|
||||
@@ -297,7 +299,7 @@ class ScheduleService
|
||||
$result = Process::timeout($timeout)->run($arguments);
|
||||
|
||||
if ($result->failed()) {
|
||||
throw new Exception($result->errorOutput() ?: __('schedule.shell_command_failed'), $result->exitCode());
|
||||
throw ScheduleExecutionException::shellCommandFailed($result->errorOutput(), $result->exitCode());
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -312,14 +314,14 @@ class ScheduleService
|
||||
* @param Schedule $schedule 스케줄
|
||||
* @return array 실행 결과
|
||||
*
|
||||
* @throws Exception 호출 실패 시
|
||||
* @throws ScheduleExecutionException 내부망 URL 이거나 호출이 실패했을 때
|
||||
*/
|
||||
private function executeUrlCall(Schedule $schedule): array
|
||||
{
|
||||
// 저장된 URL 이 그대로 서버의 outbound 목적지가 되므로, 실행 직전에도 내부망 주소를 차단한다
|
||||
// (저장 시점 검증 도입 이전 데이터나 DB 직접 수정으로 들어온 값 방어).
|
||||
if (! $this->isUrlCallAllowed($schedule->command)) {
|
||||
throw new Exception(__('schedule.url_not_public'));
|
||||
throw ScheduleExecutionException::urlNotPublic();
|
||||
}
|
||||
|
||||
$timeout = $schedule->timeout ?? 30;
|
||||
@@ -327,7 +329,7 @@ class ScheduleService
|
||||
$response = Http::timeout($timeout)->get($schedule->command);
|
||||
|
||||
if ($response->failed()) {
|
||||
throw new Exception(__('schedule.http_request_failed', ['status' => $response->status()]), $response->status());
|
||||
throw ScheduleExecutionException::httpRequestFailed($response->status());
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user