mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-25 07:26:30 +00:00
![]() Currently, `Proxmox.window.Edit` initializes `extraRequestParams` and `submitOptions` to two objects that, if not overwritten, are shared between all instances of subclasses. This bears the danger of modifying the shared object in a subclass instead of overwriting it, which affects all edit windows of the current session and can cause hard-to-catch GUI bugs. One such bug is the following: Currently, the `PVE.pool.AddStorage` component inadvertently adds `poolid` to an `extraRequestParams` object that is shared between all instances of `Proxmox.window.Edit`. As a result, after adding a storage to a pool, opening any edit window will send a GET request with a superfluous `poolid` parameter and cause an error in the GUI: > Parameter verification failed. (400) > poolid: property is not defined in schema and the schema does not > allow additional properties This breaks all edit windows of the current session. A workaround is to reload the current browser session. To avoid this class of bugs in the future, implement a constructor that makes copies of `extraRequestParams` and `submitOptions`. This ensures that any subclass instance modifies only its own copies, and modifications do not leak to other subclass instances. Suggested-by: Stefan Sterz <s.sterz@proxmox.com> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Friedrich Weber <f.weber@proxmox.com> Tested-by: Stefan Sterz <s.sterz@proxmox> |
||
---|---|---|
debian | ||
src | ||
.gitignore | ||
Makefile |