openwisp / openwisp/openwisp-controller
[bug:gsoc26] Mass command wizards started in two browser tabs overwrite each other
@dee077 is already working on this.
Since Sep 15, 2026.
- Dominant language
- Python
- Stars
- 773
- Forks
- 315
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Description
Describe the bug
The mass command wizard keeps its state in a single session slot, so starting a second mass command in another browser tab replaces the first one. The first tab can no longer execute its mass command, and reloading it shows the details entered in the second tab.
Steps To Reproduce
- In tab A, open Network Operations > Mass command execute, fill in the form (for example type Reboot) and click Review command
- In tab B, open Mass command execute, fill in the form with different values (for example type Custom commands) and click Review command
- Go back to tab A without reloading it and click Execute
- The mass command is not executed and the user is sent back to the first step with: "This mass command was replaced by another one started in a different browser tab, so it was not executed. Please fill in the details again."
- Reloading the review page in tab A shows the details entered in tab B
Expected behavior
Each tab keeps its own mass command: tab A reviews and executes what was entered in tab A, tab B what was entered in tab B.
Possible fix
The session stores one wizard under batch_command_wizard, and the review page URL is the same for every wizard, so a request cannot say which wizard it belongs to. Store the wizards in the session as a dictionary keyed by a stable wizard id, keeping only the most recent ones. The existing token, which changes when the targeted devices change, stays inside each wizard.
System Informatioon:
- OS: Ubuntu 26.04 LTS
- Python Version: Python 3.12.13
- Django Version: Django 5.2.17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.