Commit f7fa003
authored
fix(xref): move 1000-cap inside filter() and tighten route validation
- filter(): apply .slice(0, 1000) on the empty-term browse result before
returning so the MemCache stores a bounded list (not the full unbounded
DataEntry[]), fixing the memory safety concern
- searchOne(): remove the duplicate post-cache slice(0,1000) guards that
were the only cap, now redundant since filter() is already bounded
- search.get.ts: remove !types?.length from the 400-guard so that
?type=... without specs or term returns a proper 400 instead of
silently falling through to an empty-string term search that returns
misleading results; update error message accordingly
Agent-Logs-Url: https://github.com/speced/respec-web-services/sessions/eafb7347-faf9-4e79-a820-4546c4b7b0101 parent bc5238e commit f7fa003
2 files changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | 101 | | |
103 | | - | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
| |||
123 | 121 | | |
124 | 122 | | |
125 | 123 | | |
| 124 | + | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | | - | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments