Security audit - #684
Conversation
ADD: unit tests
🤖 AI PR ReviewRisk level: ReviewSummary This PR implements a security-focused audit / hardening across several modules: CSRF handling and rotation, captcha validation tightening (hCaptcha and reCAPTCHA v3), multi-gateway selection sanitization, plus a frontend token refresh in AJAX submit flow. It also adds unit tests covering these behaviors and updates build asset versions. Overall the changes improve security and add tests; a few things to verify/consider before merging are noted below. What I reviewed (notable files / changes)
Security assessment
Correctness / compatibility notes
Testing
Suggestions / minor issues to address before merge
Conclusion This PR meaningfully improves security around CSRF and captcha usage, tightens gateway selection sanitization, and adds good unit test coverage. The changes are reasonable and the tests cover most flows, but please double-check the multi-gateway save behavior and consider adding a small frontend test for the AJAX CSRF refresh. Suggested changelog entry
|
FIX: premature browser validation notice Crocoblock/issues-tracker#18733
FIX: inherited advanced validation detection Crocoblock/issues-tracker#18989
FIX: prevent clearing stale mapped fields in Insert Post action Crocoblock/issues-tracker#19370
FIX: resolve late registered form messages Crocoblock/issues-tracker#19945
FIX: return empty list instead of 404 for no records Crocoblock/issues-tracker#20076
🤖 AI PR ReviewRisk level: ReviewSummary What I checked
Files / areas of interest (notes & recommendations)
Other small notes
Required follow-ups / recommendations
Overall: The changes improve security and correctness with reasonable care taken to sanitize inputs and add tests for captchas. The multi-gateway persistence change is the highest risk/confusing part because it writes configuration during a submit request — please add tests and an explicit comment documenting expectations and permission model. Suggested changelog entry
|
🤖 AI PR ReviewRisk level: ReviewSummary
Security, capability checks and CSRF
XSS / DOM sanitization
Behavioral / backward compatibility
Performance & large sites
Multisite / integrations
Other remarks
Tests missing / recommended
Files of interest (high level)
Conclusion
Required/Recommended follow-ups
If you want I can propose a small patch to validate the CSRF token before applying it and to escape messages placed into title attributes. Suggested changelog entry
|
🤖 AI PR ReviewRisk level: ReviewSummary
What I looked for
Findings & recommendations
Files of interest (callouts)
Overall assessment
Suggested code additions (examples)
If you want I can propose a small patch to add the token type/length checks and to normalize formId comparisons. Suggested changelog entry
|
🤖 AI PR ReviewRisk level: ReviewSummary
Security, correctness and compatibility review
Missing tests and QA
Other suggestions
Conclusion
Suggested changelog entry
|
|
Merged to release/3.6.5 |
issue - https://github.com/Crocoblock/issues-tracker/issues/20122