Skip to content

fix: harden backend command validation#13

Closed
Batuhan4 wants to merge 1 commit into
mainfrom
cursor/repository-code-analysis-cf36
Closed

fix: harden backend command validation#13
Batuhan4 wants to merge 1 commit into
mainfrom
cursor/repository-code-analysis-cf36

Conversation

@Batuhan4
Copy link
Copy Markdown
Owner

Summary

  • add shared backend validation helpers for fan IDs, integers, modes, and RGB triplets
  • reject malformed fan and keyboard socket input before it reaches helper scripts or sysfs writes
  • add a small backend validation test target and update the README to reflect the repo's actual test workflow

Testing

  • g++ -std=c++20 -Ibackend/src backend/tests/validation_test.cpp backend/src/validation.cpp -o .tmp-build/backend-validation-test && ./.tmp-build/backend-validation-test
  • g++ -std=c++20 -Ibackend/src -c backend/src/validation.cpp -o .tmp-build/validation.o
  • g++ -std=c++20 -Ibackend/src -c backend/src/keyboard.cpp -o .tmp-build/keyboard.o
  • g++ -std=c++20 -Ibackend/src -c backend/src/main.cpp -o .tmp-build/main.o
  • g++ -std=c++20 -Ibackend/src -c backend/src/fan.cpp -o .tmp-build/fan.o

Notes

  • Full meson/GTK build validation was not possible in this cloud environment because meson, ninja, and gtk4 development packages are not installed.
Open in Web Open in Cursor 

@github-actions
Copy link
Copy Markdown

🤖 Hi @Batuhan4, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Copy Markdown

🤖 I'm sorry @Batuhan4, but I was unable to process your request. Please see the logs for more details.

@Batuhan4
Copy link
Copy Markdown
Owner Author

Closing as superseded by the consolidated local fix branch and follow-up testing.

@Batuhan4 Batuhan4 closed this Mar 22, 2026
@Batuhan4 Batuhan4 deleted the cursor/repository-code-analysis-cf36 branch March 22, 2026 22:07
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.

2 participants