occ config:app:set --value ignores --no-sensitive (and drops --sensitive for boolean values)
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
- 75/100
Hướng nghiên cứu
Bắt đầu với core/Command/Config/App/SetConfig.php và theo dõi cách xử lý --value cho từng kiểu được hỗ trợ, sau đó đọc lib/private/AppConfig.php và các trường hợp hiện có trong tests/Core/Command/Config/App/SetConfigTest.php. Bổ sung kiểm thử cho việc xóa tính nhạy cảm sau khi xác nhận và cho các giá trị boolean khi dùng --sensitive. Hoàn thành khi cả hai hành vi đều được kiểm thử và bài kiểm thử tập trung 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
occ config:app:set <app> <key> --value=… --no-sensitive asks for confirmation to change the sensitive flag, but the flag is never cleared:
The resulting $sensitive = false is passed to setValueString()/setValueInt()/…, but AppConfig::setTypedValue() keeps an existing sensitive flag (it only ever switches sensitivity from false to true):
https://github.com/nextcloud/server/blob/3a68340a6c806a18cdd0d9667a3b9ec5f096b135/lib/private/AppConfig.php#L872-L874
https://github.com/nextcloud/server/blob/3a68340a6c806a18cdd0d9667a3b9ec5f096b135/lib/private/AppConfig.php#L951-L953
Only the branch without --value calls updateSensitive(). In addition, the boolean case does not pass $sensitive at all, so --sensitive is silently ignored for --type=boolean:
Steps to reproduce
Found by code reading.
occ config:app:set myapp mykey --value=foo --sensitiveocc config:app:set myapp mykey --value=bar --no-sensitiveand confirm the questionocc config:app:get myapp mykey --detailsstill shows the key as sensitive.
Expected behavior
When the admin confirms the change, --no-sensitive clears the flag (e.g. by calling updateSensitive() after setting the value, like the branch without --value does), and --sensitive is honoured for boolean values too. A test in tests/Core/Command/Config/App/SetConfigTest.php should cover both. (The wrong "Config value was not updated" output for type-only changes is tracked separately in #60065.)
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
-
bug feature: TaskProcessing good first issue
Độ 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
-
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
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 ·