[Bug]: F-21 Overwriting a file within the same second keeps the old etag
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
apps/dav/lib/Connector/Sabre/File.php と、Nextcloud 35.0.1 で失敗するユニットテストから始めます。同じ秒内にローカルファイルを3回上書きするケースを再現し、DAV アップロード後にキャッシュされた etag がどのように扱われるかを追跡します。完了の条件は、内容を変更する各上書きが新しい etag を受け取り、名前変更やその他の内容を変更しない操作では etag が保持されることです。
索引モデルが issue の本文から書いたものです。
説明
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
F-21 · Overwriting a file within the same second keeps the old etag (upstream #63994)
| Severity | Medium (clients do not see the change, Text and sync clients keep stale content) |
| Component | apps/dav/lib/Connector/Sabre/File.php, local storage etag |
| Affects | 35.0.1 |
| Upstream | https://github.com/nextcloud/server/issues/63994 |
| Verified | Yes, on the test server and with a unit test that fails on 35.0.1 |
Measurement (local storage, three PUTs of 4 bytes within one second)
35.0.1: "ca1d3d5e…" "ca1d3d5e…" "ca1d3d5e…" same etag
patched: "784b5dca…" "23f010bc…" "6ac0fd38…" new etag each time
Root cause
The local storage derives the etag from mtime (seconds), inode, device and size. Same size, same
second and a reused inode give the same etag although the content changed.
Fix
After a DAV upload to an existing file, when the cache still has the previous etag, a new one is set.
Renames and other operations that do not change content keep their etag.
Steps to reproduce
see the top
Expected behavior
see the top
Nextcloud Server version
35
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
- 主要言語
- PHP
- スター
- 37k
- フォーク
- 5.3k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 702
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/server のほかの issue
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
nextcloud/server の issue をすべて見る
似ている issue
-
Talk Review
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
socallinuxexpo/scale-drupal#351 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
code4romania/cpc#47 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
mautic/api-library#351 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
nunomaduro/collision#371 ·
-
Lead create/update: a product row without a "product_id" key passes LeadForm validation and fails in the database (500)対応中かも @Arslan-TR が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
krayin/laravel-crm#2681 ·
メンテナーはふだん 2 日以内に返信