[Bug]:
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ệ
- typescript
Hướng nghiên cứu
Bắt đầu với apps/files/src/services/DropServiceUtils.ts, đặc biệt là createDirectoryIfNotExists(), sau đó lần theo lời gọi từ apps/files/src/services/DropService.ts:136. Kiểm tra cách getClient(destination.source) xử lý các đường dẫn chứa # và so sánh đường dẫn PROPFIND được tạo với đường dẫn PUT đã mã hóa. Hoàn tất khi việc tải thư mục lên các đường dẫn có # tạo được thư mục và tải lên thành công các tệp bên trong.
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
Uploading a folder (drag and drop, or New > Upload folder) into a folder whose path contains "#" fails. Each file shows its own "Target folder does not exist any more" toast. The dropped folder is not created and no files are uploaded.
It happens on normal home storage and on local external storage, so the storage type is not a factor. Paths without "#" work.
Likely cause (from reading stable35; I haven't debugged it): createDirectoryIfNotExists() in apps/files/src/services/DropServiceUtils.ts builds the WebDAV client with getClient(destination.source). The "#" in the source URL is not encoded, so everything after it is treated as a URL fragment and dropped. davClient.exists(path) therefore sends a PROPFIND to the nearest ancestor before the "#". That folder exists and returns 207, so createDirectory() is skipped. The file PUTs then go to the correctly encoded path (%23), whose parent was never created, and return 404, which shows up as the toast.
The network log matches this exactly: PROPFIND on the truncated path, then PUT 404, and no MKCOL. I have not checked whether New > Upload folder goes through the same function, but it fails the same way.
Steps to reproduce
- In Files (home storage), create a top-level folder named "#test" with New > Folder.
- Open "#test".
- Drag a local folder "ACC" containing one file (e.g. Screenshot.png) into the file list. Or use New > Upload folder and pick "ACC".
- Result: a "Target folder does not exist any more" toast for each file; "ACC" is not created and nothing is uploaded.
Network tab for step 3:
PROPFIND https:///remote.php/dav/files/ -> 207 (truncated at "#", should be /files//%23test/ACC)
PUT https:///remote.php/dav/files//%23test/ACC/Screenshot.png -> 404
Same with local external storage, e.g. dropping "ACC" into /Work/#Org/#client-data/foobar/:
PROPFIND https:///remote.php/dav/files//Work (truncated at the first "#")
PUT https:///remote.php/dav/files//Work/%23Org/%23client-data/foobar/ACC/Screenshot.png -> 404
Expected behavior
The folder "ACC" is created inside "#test" and its files are uploaded, the same as for a path without "#".
Nextcloud Server version
35
Operating system
Other
PHP engine version
PHP 8.5
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"dbindex": 0,
"password": "***REMOVED SENSITIVE VALUE***",
"timeout": 1.5
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"<host>"
],
"dbtype": "mysql",
"version": "35.0.3.2",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https:\/\/<host>",
"overwritehost": "<host>",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"default_phone_region": "AT",
"maintenance": false,
"maintenance_window_start": 1,
"theme": "",
"loglevel": 2,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "tls",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"home",
"admin"
],
"twofactor_enforced_excluded_groups": [
"guests"
],
"memories.exiftool": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/eperl-amd64-musl",
"memories.vod.path": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.db.triggers.fcu": true,
"preview_max_x": 2048,
"preview_max_y": 2048,
"hsts": true,
"preview_max_memory": 256,
"filelocking.enabled": true,
"upgrade.disable-web": true,
"allow_local_remote_servers": true,
"memories.vips.path": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/vips-amd64",
"trashbin_retention_obligation": "auto,30",
"versions_retention_obligation": "auto,90"
}
}
List of activated Apps
- bookmarks: 17.0.2
- calendar: 6.6.5
- contacts: 8.10.0
- deck: 1.19.2
- memories: 11.1.4
- notes: 6.1.1
- previewgenerator: 5.15.0
- recognize: 13.2.0
- tasks: 0.18.1
- user_oidc: 8.13.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No server log entries for the failed upload at the default log level. The failure happens in the browser: the PROPFIND URL is truncated at "#" before it is sent, and the server correctly returns 404 for the PUT into the never-created folder (see network log in "Steps to reproduce").
Additional info
Client: Firefox 160.0 (64-bit) on Fedora KDE. Server: linuxserver/nextcloud 35.0.3 Docker image on Synology DSM, MariaDB 12.3.3, PHP 8.5.12.
Works:
- uploading a folder into paths without "#"
- New > Folder inside a "#" path
- uploading files (not folders) into a folder that already exists inside a "#" path
Not a duplicate of #58454, #59197, #59258, #60063: same toast, but those are the subfolder bug fixed in 33.0.3, and this still happens on 35.0.3.
Possibly related: #61854 (special characters, double quotes in folder names).
Code reference (stable35): apps/files/src/services/DropServiceUtils.ts createDirectoryIfNotExists(), called from apps/files/src/services/DropService.ts:136.
- Ngôn ngữ chính
- PHP
- Star
- 37.6k
- Fork
- 5.4k
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 641
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 bug feature: sharing regression
Độ 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 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Personal Settings > Security > Passwordless Authentication device icon in dark mode is blackĐang mở0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
35-feedback
Độ 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 66/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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
nginx: 429 instead of stock 503 on /public-, /~ and subdomain proxy throttles, with a copy-pin testĐang mởagentic bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MagnaCapax/PMSS#1299 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
matomo-org/plugin-CustomAlerts#310 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Icinga/icinga-kubernetes-web#200 ·
Maintainer thường phản hồi trong vòng 7 ngày