diff options
author | Matěj Suchánek <matejsuchanek97@gmail.com> | 2025-04-05 14:53:38 +0200 |
---|---|---|
committer | Matěj Suchánek <matejsuchanek97@gmail.com> | 2025-04-05 14:53:38 +0200 |
commit | d050670a83a45268df04f299d5daf014b57fe4b1 (patch) | |
tree | 57533906d6ddbe04a83ad64bc200fef4fd687204 /includes/libs/Cookie.php | |
parent | a884a46ed119b0927f7a02dc0cdb25bb2562898d (diff) | |
download | mediawikicore-d050670a83a45268df04f299d5daf014b57fe4b1.tar.gz mediawikicore-d050670a83a45268df04f299d5daf014b57fe4b1.zip |
multiblocks: Prevent reuse of loop variable
Why:
- BlockIpComplete informs subscribers when a block is placed
or updated.
- With CONFLICT_NEW, a block can be just inserted, never updated.
However, the loop over prior blocks can set $priorBlock to
an arbitrary block or keep it null, possibly confusing
subscribers of the hook (e.g., by claiming a block is not
active anymore).
What:
- Make sure $priorBlock is always null in this code path.
- Also reuse the $priorBlocks array in the loop.
Change-Id: I7e6b55a50cb78f77dedc074689dc3fe3b3484a2f
Diffstat (limited to 'includes/libs/Cookie.php')
0 files changed, 0 insertions, 0 deletions