Repository navigation
【管理画面・ブログ・メール】不正な送信値やパスの ID で 500 エラーになる問題を解決 - #4659
Merged
Merged
Conversation
VAddy のスキャンで、フォームの送信値やパスの ID に数字以外を指定すると 500 エラーになる箇所が見つかったため、404・400 または入力エラーとなるよう修正。 - パスの ID に int 型を指定(サイトの公開・非公開・削除、ユーザー削除、 ユーザーグループの削除・コピー、アクセスルールの削除・複製・有効・無効) - サイト追加・編集のエイリアス重複チェックで、数字以外の ID は条件にしない - ブログ記事の登録・編集で、数字以外のブログタグ ID は取り除く - ブログコメント投稿で、ブログ・記事の ID が未指定または数字以外の場合は 400 - ブログカテゴリ API で blog_content_id が未指定の場合は 400 - メールフィールド追加でフィールド名が送信されない場合は入力エラー Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
VAddy による脆弱性スキャンを、検証環境で CSRF / FormProtection の検証を一時的に止めた状態で実施したところ、フォームの送信値やパスの ID に数字以外を指定すると 500 エラーになる箇所が見つかったため修正しました(スキャンでの脆弱性の検出はありませんでした)。
#4652 とは別の箇所です(#4652 は一覧の絞り込み条件と編集画面のパスの ID が中心)。
変更内容
blog_tags._ids)は取り除くajax_add_comment)で、ブログ・記事の ID が未指定または数字以外の場合は 400blog_content_idが未指定の場合は 500 ではなく 400field_nameを必須に)対象外としたもの
catch (\Throwable)で受けて 500 を返す作りになっており、不正な値でも 500 を返す。エラーにはならず意図した応答のため、本 PR では扱っていませんテスト
🤖 Generated with Claude Code