You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(parsing): guard unsafe string parsing in filter parsers (#58)
- Add validation before Substring operations to prevent index exceptions
- Replace int.Parse with TryParse for group indices in logical group
parsing
- Add ILogger? parameter to parser methods for warning on malformed
input
- Malformed filter keys are logged and skipped instead of throwing
- Add 12 regression tests for malformed input handling
Copy file name to clipboardExpand all lines: CLAUDE.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,10 +39,10 @@ dotnet pack JsonApiToolkit/JsonApiToolkit.csproj -p:PackageVersion=VERSION -c Re
39
39
```bash
40
40
# Format code with CSharpier
41
41
dotnet tool restore
42
-
dotnet csharpier .
42
+
dotnet csharpier format .
43
43
44
-
# Check formatting
45
-
dotnet csharpier . --check
44
+
# Check formatting (CI uses this)
45
+
dotnet csharpier check.
46
46
```
47
47
48
48
### Documentation
@@ -98,6 +98,7 @@ Enable detailed logging for query processing and troubleshooting:
98
98
99
99
8.**Helpers** (`Helpers/`)
100
100
-`EfIncludePathHelper`: Utilities for building EF Core Include expressions
101
+
-`ReflectionMethodCache`: Cached reflection method lookups with defensive checks and clear error messages
101
102
102
103
### Key Patterns
103
104
@@ -109,6 +110,7 @@ Enable detailed logging for query processing and troubleshooting:
109
110
-**JSON column detection**: Collections and complex objects without ID properties are automatically mapped as JSON attributes instead of relationships (useful for EF Core owned entities stored as JSON columns)
110
111
-**Pagination safety**: Invalid page numbers are automatically clamped to valid ranges (page 1 for negative/zero, last page for overflow)
111
112
-**Include whitelisting**: Use `AllowedIncludesAttribute` on controller actions to restrict which relationships can be included, preventing unauthorized data exposure
113
+
-**Graceful error handling**: Malformed query parameters are logged and skipped rather than throwing exceptions
112
114
113
115
### Service Registration
114
116
@@ -140,10 +142,14 @@ JsonApiToolkit provides a comprehensive error handling system with standardized
@@ -166,4 +172,13 @@ Tests are organized by component:
166
172
167
173
## Package Publication
168
174
169
-
The project publishes to GitHub Packages. Use semantic versioning for releases. The CI/CD pipeline automatically builds, tests, and publishes on GitHub releases.
175
+
The project publishes to GitHub Packages. Use semantic versioning for releases. The CI/CD pipeline automatically builds, tests, and publishes on GitHub releases.
176
+
177
+
## Refactoring Roadmap
178
+
179
+
The project has a structured refactoring plan in `.claude/`:
180
+
-`REFACTORING_ROADMAP.md` - Phase-by-phase plan with checklists
181
+
-`CODEBASE_ANALYSIS.md` - Analysis of issues found in the codebase
0 commit comments