[Bug]: F-21 Overwriting a file within the same second keeps the old etag
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với apps/dav/lib/Connector/Sabre/File.php và unit test bị lỗi trên Nextcloud 35.0.1. Tái hiện ba lần ghi đè một tệp cục bộ trong cùng một giây và theo dõi cách etag được lưu trong bộ nhớ đệm được xử lý sau một lần tải lên DAV. Hoàn tất khi mỗi lần ghi đè làm thay đổi nội dung nhận được một etag mới, còn việc đổi tên và các thao tác không làm thay đổi nội dung khác vẫn giữ nguyên etag của chúng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
⚠️ 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
- Ngôn ngữ chính
- PHP
- Star
- 37k
- Fork
- 5.3k
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 702
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/server
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/server
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
awslabs/aidlc-workflows#1879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug customer-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MagnaCapax/PMSS#1011 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Talk Review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
socallinuxexpo/scale-drupal#351 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
code4romania/cpc#47 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày