Commit dea594e
authored
UR-4797 Fix - Email confirmation workflow bypassed on profile update (#1383)
* UR-4797 Fix - Email confirmation workflow bypassed on profile update
* UR-4797 Fix - Derive is_admin_user server-side instead of trusting $_POST
$_POST['is_admin_user'] is client-supplied and spoofable - adding it to a normal profile save request skips email confirmation entirely. current_user_can('edit_user', $user_id) a few lines above already proves whether the actor may manage $user_id, so deriving is_admin_user from that (user_id !== current user) closes the gap without changing any downstream logic.1 parent e276131 commit dea594e
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | | - | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
0 commit comments