Commit fe73af4
committed
JEXL-462 : close RESTRICTED permission set; fix wildcard exposure
- Replace all '.*' wildcards in RESTRICTED with explicit '+{}' package declarations so future JDK subpackages are never silently admitted.
- Add missing safe packages (java.uti.function/stream/regex/concurrent.atomic, java.time.chrono/format/temporal/zone) and deny known hazards (ZoneRulesProvider, executor classes, java.util.zip/jar/prefs/logging via the closed-world boundary).
- Extend the permissions engine: any explicit package declaration (positive or negative) now closes the world — only declared packages are accessible.
- NoJexlPackage gains hasAllowedClass() to distinguish a deny-list (unlisted class = allowed) from an allow-list (unlisted class = denied), matching the semantics of 'java.lang { Runtime {} }' vs 'java.io -{ +PrintWriter{} }'.1 parent 2c900c8 commit fe73af4
3 files changed
Lines changed: 97 additions & 30 deletions
File tree
- src/main/java/org/apache/commons/jexl3
- internal/introspection
- introspection
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
175 | 191 | | |
176 | 192 | | |
177 | 193 | | |
| |||
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
253 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
254 | 274 | | |
255 | 275 | | |
256 | 276 | | |
257 | 277 | | |
258 | 278 | | |
259 | | - | |
| 279 | + | |
| 280 | + | |
260 | 281 | | |
261 | 282 | | |
262 | 283 | | |
| |||
361 | 382 | | |
362 | 383 | | |
363 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
364 | 400 | | |
365 | 401 | | |
366 | 402 | | |
367 | 403 | | |
368 | 404 | | |
369 | 405 | | |
370 | 406 | | |
371 | | - | |
| 407 | + | |
372 | 408 | | |
373 | 409 | | |
374 | 410 | | |
| |||
384 | 420 | | |
385 | 421 | | |
386 | 422 | | |
387 | | - | |
| 423 | + | |
388 | 424 | | |
389 | 425 | | |
390 | 426 | | |
391 | 427 | | |
392 | 428 | | |
393 | 429 | | |
394 | | - | |
395 | 430 | | |
396 | 431 | | |
397 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
398 | 436 | | |
399 | | - | |
| 437 | + | |
400 | 438 | | |
401 | 439 | | |
402 | 440 | | |
| |||
627 | 665 | | |
628 | 666 | | |
629 | 667 | | |
630 | | - | |
| 668 | + | |
631 | 669 | | |
632 | 670 | | |
633 | 671 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
384 | 391 | | |
385 | 392 | | |
386 | 393 | | |
| |||
Lines changed: 45 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
278 | 282 | | |
| 283 | + | |
279 | 284 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
296 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
300 | 309 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
306 | 328 | | |
307 | 329 | | |
308 | 330 | | |
| |||
0 commit comments