openwisp-controller icon indicating copy to clipboard operation
openwisp-controller copied to clipboard

[Fix] Ensure malformed UUID URLs return 404 #682

Open stktyagi opened this issue 2 months ago • 0 comments

Checklist

  • [x] I have read the OpenWISP Contributing Guidelines.
  • [x] I have manually tested the changes proposed in this pull request.
  • [x] I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • [ ] I have updated the documentation.

Reference to Existing Issue

Closes #682

Description of Changes

Applied strict UUID regex (allowing dashless) to URL patterns, replacing permissive pattern. Updated controller API tests to manually build invalid URLs and assert 404, resolving NoReverseMatch errors. Added regression test to verify malformed admin URLs correctly return 404, preventing bug recurrence.

stktyagi avatar Oct 25 '25 10:10 stktyagi