mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 16:04:50 +03:00
52f5fb5205
Keep the existing node API token unless an operator explicitly requests a replacement. Initialize edit sessions with an empty replacement draft and keep the credential field unmounted by default. Omit apiToken from Test Connection, Save, fingerprint, and inbound-loading requests in keep mode, while preserving explicit replacement, token clearing, and tokenless mTLS behavior. Accept historyUndo/historyRedo input events so undoing and redoing an explicit replacement remains synchronized with form state. Add regression coverage for the default keep path, replacement flow, and Undo/Redo. The first edit after a page refresh could otherwise submit an unintended non-empty password value as a replacement token, causing Test Connection and Save to fail. The exact browser/password-manager trigger was not independently reproduced; this change fixes the unsafe form/payload behavior at its source. Addresses #7349.