TaskProcessing checkGuestAccess() fails with an Error for a deleted user id
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
- 84/100
Hướng nghiên cứu
Đọc lib/private/TaskProcessing/Manager.php ở phần quanh checkGuestAccess() và kiểm tra các bài kiểm thử hiện có trong tests/lib/TaskProcessing/TaskProcessingTest.php. Tái hiện trường hợp ID người dùng đã cũ được mô tả trong issue, sau đó bổ sung kiểm thử cho người dùng không tồn tại. Công việc hoàn tất khi thao tác tra cứu xử lý người dùng null mà không ném ngoại lệ và bài kiểm thử chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
Manager::checkGuestAccess() resolves the user with IUserManager::get() but does not handle null:
If the user id no longer exists (e.g. a task of a deleted account that is processed or rescheduled, or getAvailableTaskTypes() called with a stale user id), the guests app is installed and ai.taskprocessing_guests is not 'true', this ends in Call to a member function getBackend() on null instead of a clean result.
Steps to reproduce
Found by code reading.
- Install the guests app, keep
ai.taskprocessing_guestsat its default. - Schedule a task for a user, delete the user before the task is processed.
- Processing / looking up the task's type calls
checkGuestAccess($task->getUserId())and throws anError.
Expected behavior
A missing user is handled explicitly (e.g. $user === null → no guest access check / deny), covered by a test in tests/lib/TaskProcessing/TaskProcessingTest.php.
Nextcloud version
master
- Ngôn ngữ chính
- PHP
- Star
- 37.6k
- Fork
- 5.4k
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 605
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
-
Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.phpĐang mởenhancement feature: settings good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug feature: previews and thumbnails performance 🚀
Độ 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
-
files_external occ commands crash with InvalidArgumentException for SMB mounts without credentialsĐang mởbug feature: external storage feature: occ good first issue
Độ 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
-
"Forwarded for headers" setup check trusts a client-sent Remote-Addr header and ignores CIDR proxiesĐang mởbug feature: settings
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
occ config:app:set --value ignores --no-sensitive (and drops --sensitive for boolean values)Đang mởbug feature: occ
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/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 76/100
nextcloud/integration_openai#480 ·
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 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
omeka/plugin-Contribution#84 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
recca0120/vscode-phpunit#620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Validation rule generation for recursive Data objects is unbounded (O(payload depth))Có thể đã có người làm @irfanm96 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
spatie/laravel-data#1226 ·