Commit d93657e
Switch getXMLSchema() resolver from blocklist to allowlist
Gemini review identified that blocking specific schemes (http, https,
ftp, jar) while allowing file:// leaves a Local File Inclusion (LFI)
vector. Switch to allowlist approach: block ALL absolute URIs in the
default restrictive resolver. Only relative paths (resolved against
the document base URI) are permitted. This prevents SSRF, LFI, and
any future bypass via exotic URI schemes.
Co-packaged schemas in .aar/.war deployments use relative paths and
are unaffected. Applications needing absolute URI resolution can
supply their own resolver via setCustomResolver().
404 kernel tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0afbb74 commit d93657e
1 file changed
Lines changed: 22 additions & 15 deletions
Lines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
161 | 171 | | |
162 | | - | |
163 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
164 | 180 | | |
165 | 181 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
| |||
0 commit comments