Commit f27d7bc
Guard against null workflow item in the WORKFLOWITEM permission evaluator
WorkflowRestPermissionEvaluatorPlugin dereferenced the result of
workflowItemService.find() without a null check, so an unknown id from an
authenticated non-admin threw a NullPointerException (HTTP 500) instead of
404. The sibling PoolTask/ClaimedTask evaluators already guard this case;
mirror them by returning true for a null item so the handler can produce the
proper 404. Now reachable via the newly authorized /step subresource.
Add a regression test asserting an unknown workflowitem /step id yields 404.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent ba6ba4a commit f27d7bc
2 files changed
Lines changed: 21 additions & 0 deletions
File tree
- dspace-server-webapp/src
- main/java/org/dspace/app/rest/security
- test/java/org/dspace/app/rest
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
151 | 168 | | |
0 commit comments