org.apache.commons.io.FileSystem.isLegalFileName(CharSequence candidate) method is unreasonable
- 主要言語
- Java
- スター
- 6.4k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 115
説明
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
### Motivation
FileSystem.isLegalFileName(CharSequence candidate) method, there is a verification logic : candidate.length() > maxFileNameLength. maxFileNameLength is string length. but when file name bytes exceed 255 will cause system errors. java.io.FileNotFoundException : File name too long.
### Solution
maxFileNameLength verify file name bytes length
### Alternatives
no
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
コントリビューションガイド
調査の方向性
まず、リポジトリ内で org.apache.commons.io.FileSystem.isLegalFileName(CharSequence candidate) が使用されている箇所を特定し、maxFileNameLength がどのように適用されているかを確認します。エンコード後のバイト長がファイルシステムの制限を超えるファイル名で動作を検証し、結果として FileNotFoundException が発生する前にバリデーションによってそのような名前が拒否されれば、問題は完了したものとみなします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100