Commit 645e41a
committed
fix(@angular/ssr): ensure public directory containment in CommonEngine
Ensure that paths resolved in `retrieveSSGPage` strictly remain within the configured `publicPath` by checking `relative()` containment before evaluating the static file.
Previously, a string `startsWith()` check was used, which could match sibling directories that share the same name prefix as `publicPath`.1 parent d3aaa48 commit 645e41a
1 file changed
Lines changed: 8 additions & 6 deletions
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
0 commit comments