test: add tests for IpRestrictionService #3
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-api#3
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Missing Test Coverage
File:
src/Api/Services/IpRestrictionService.phpWhat Needs Testing
Context
This service handles security-critical IP validation for API key access control. Comprehensive test coverage is essential to ensure:
Implementation Notes
Create
src/Api/Tests/Feature/IpRestrictionServiceTest.phpwith test cases for:isAllowed()with various IP/CIDR combinationsipv4MatchesCidr()edge casesipv6MatchesCidr()with different prefix lengthsparseWhitelistInput()with malformed inputPriority
High - Security feature requires thorough testing