Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: F-21 Overwriting a file within the same second keeps the old etag

Đang mở Phù hợp với người mới
#65,078 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
api, backend

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ả

0. Needs triage 35-feedback bug
⚠️ 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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/server

Tất cả issue của nextcloud/server

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.