Skip to content

Fix security condition check#2922

Open
Sn0w3y wants to merge 2 commits intotbnobody:masterfrom
Sn0w3y:master
Open

Fix security condition check#2922
Sn0w3y wants to merge 2 commits intotbnobody:masterfrom
Sn0w3y:master

Conversation

@Sn0w3y
Copy link
Copy Markdown

@Sn0w3y Sn0w3y commented Dec 16, 2025

Corrected the logical condition in WebApiSecurityClass::onSecurityPost to properly handle cases where 'allow_readonly' is not a boolean. This change ensures that the security checks accurately identify missing or incorrectly formatted values, improving the robustness of the API's security posture.

Corrected the logical condition in WebApiSecurityClass::onSecurityPost to properly handle cases where 'allow_readonly' is not a boolean. This change ensures that the security checks accurately identify missing or incorrectly formatted values, improving the robustness of the API's security posture.
Refactored variable assignments for clarity by using const qualifiers, improving readability and ensuring immutability where applicable. Simplified string length checks and comparisons by assigning string operations to variables before conditions, enhancing code maintainability. These changes affect MQTT handling, Web API endpoints for devices, inverters, MQTT configuration, network settings, NTP settings, Prometheus metrics, security settings, and live WebSocket data, indicating a broad impact on the codebase aimed at improving overall code quality and reliability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant