Design settings save throws string-offset TypeError for scalar options
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
- 69/100
Hướng nghiên cứu
Đọc includes/classes/wp-maintenance-mode-admin.php, đặc biệt là save_plugin_settings() ở nhánh Design, sau đó kiểm tra tests/page-state-test.php và helper save_design_settings() của tệp này. Tái hiện thao tác lưu Design đã xác thực với options dạng scalar và options[design] dạng scalar, rồi so sánh với cách gửi biểu mẫu thông thường. Hoàn thành khi các dạng option không hợp lệ bị từ chối mà không phát sinh TypeError không được xử lý, và thao tác lưu Design hợp lệ vẫn vượt qua bài kiểm tra hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Saving Design settings can terminate with TypeError: Cannot access offset of type string on string when the submitted options structure contains a string where an array is expected. Invalid settings submissions are expected to be rejected without an uncaught exception. The captured failure aborts the settings-save request.
Customer context
- Product / area: LightStart, Design settings save
- Version: 2.6.25
- Environment: PHP and WordPress versions not provided
- Reported error:
TypeError: Cannot access offset of type string on string - Impact: Settings-save request terminates
- Evidence: Error captured in two November 4 uninstall submissions; exact request bodies unavailable
Reproduction notes
Repository-derived reproduction, not executed: submit the authenticated settings-save action with tab=design, a valid tab-design nonce, and either string-valued options or string-valued options[design]. The source reaches the reported offset access after its existing guards. The actual captured payload and PHP version are unavailable.
Diagnosis
Conclusion
The captured Design settings error matches a definite unchecked request-shape access in v2.6.25. This is source-backed confirmation, not an inference from the number of uninstall comments. The request body that produced the recorded error remains unknown.
Where this likely occurs
includes/classes/wp-maintenance-mode-admin.phplines 72–73,WP_Maintenance_Mode_Admin::__construct(): registerssave_plugin_settings()on the authenticated settings-save action.includes/classes/wp-maintenance-mode-admin.phplines 392–417 and 468–472,WP_Maintenance_Mode_Admin::save_plugin_settings(): capability, nonce, and tab checks precede the Design branch, but neither options container is type-validated before accessing$_POST['options']['design']['title']. A string-valued container can produce the recorded TypeError at line 470 before field sanitization completes.views/settings.phplines 203 and 337–346, Design settings form: ordinary markup submits nested Design option fields.- Tagged v2.6.25 source matches the recorded line. Blame attributes the access to commit
72a22e07; the v2.6.24..v2.6.25 comparison leaves this handler unchanged, so no new regression is established.
Engineering notes
The failing structure is submitted POST data rather than the saved settings option. The path requires passing capability, nonce, and tab checks. Ordinary form markup is array-shaped; the origin of scalar data in the captured requests is unknown. The failure occurs while evaluating the field access, independently of the field sanitizer's behavior. No anonymous exploit or broader frontend failure is established.
Test coverage status
tests/page-state-test.php lines 186–214, Test_Page_State::save_design_settings(), constructs an array-shaped Design submission; test_design_form_save_switches_selection_through_the_same_lifecycle() begins at line 217. No relevant scalar-container coverage was found during inspection. PHP and Docker are unavailable in this environment, so tests and a local PHP reproduction were not run.
What to verify or explore next
- Reproduce an authenticated Design save with a valid tab nonce and scalar
options, then with scalaroptions[design]. - Compare responses with an ordinary Design form submission.
- Obtain the originating request shape and PHP version if available.
Unknowns / follow-up
The telemetry includes no request body or stack trace. The reason the malformed payload was submitted is not established.
Confidence
Confidence: 93/100
The affected tag contains an unguarded Design field access at the exact captured error line, consistent with a scalar options container.
Source: automated uninstall feedback — wp-maintenance-mode, 2026-11-04
Generated by bug-report-triage (ID: bug-report-triage_6aec0d90cde642.94809936)
- Ngôn ngữ chính
- PHP
- Star
- 163
- Fork
- 82
- Merge trung bình
- 4 giờ 2 phút
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- 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 Codeinwp/wp-maintenance-mode
-
bug-report bug-report-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Codeinwp/wp-maintenance-mode#595 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer report feature-request-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Codeinwp/wp-maintenance-mode#587 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
Codeinwp/wp-maintenance-mode#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
Codeinwp/wp-maintenance-mode#550 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Codeinwp/wp-maintenance-mode#549 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Codeinwp/wp-maintenance-mode
Issue tương tự
-
No Code Attached Yet
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
joomla/joomla-cms#48786 ·
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 76/100
Icinga/icingaweb2-module-director#3188 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
hashtopolis/server#2614 ·
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 76/100
-
sync-en
Độ khó 1/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