プロジェクト

全般

プロフィール

Vote #77930

完了

Restrict the length attachment filenames on disk

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
119
issue_org_id:
24186
author_id:
2784
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

When uploading a file with a very long name, the @disk_filename@ might be too long to be stored on the server's filesystem.

Since Redmine always prepends the timestamp to the name of the uploaded file, the final @disk_filename@ will be longer than 255 characters (the common limit for filenames on most file systems) if the original filename is between 240 and 255 characters long. If that is the case, the attachment save will fail with a @Errno::ENAMETOOLONG@ exception when attempting to write the file to disk.

The attached patch by "Planio":https://plan.io/redmine-hosting fixes this behavior by restricting the length of the filename 50 characters (to have some breathing room on unusual file systems). In that case, we just use the ASCII fallback we already have in place.


journals

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリAttachments_19 にセット
  • 対象バージョン3.4.0_119 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0