Warn about maintenance command interruptions
What changed, and why it matters
This commit only adds a user-facing warning message in the maintenance tool explaining that the server may restart during a command and that the user should refresh the page if disconnected. It also marks several unit tests as 'Fast' tests. There is no security fix or vulnerability change in the code.
No security action needed. Treat as routine UI/UX and test-categorization commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a Bootstrap warning alert to MaintenanceCommands.razor and a corresponding default translation string. It also adds [Trait(‘Fast’,’Fast’)] attributes to six test classes. No logic, authorization, input handling, or network behavior is changed.
Changed components
BTCPayServer/Plugins/Maintenance/Components/MaintenanceCommands.razorBTCPayServer/Plugins/Translations/Translations.Default.csBTCPayServer.Tests unit test trait metadataInspect captured patch +10 / −0
### BTCPayServer.Tests/LightningConnectionStringSafetyTests.cs
@@ -6,6 +6,7 @@
namespace BTCPayServer.Tests;
+[Trait("Fast", "Fast")]
public class LightningConnectionStringSafetyTests
{
[Theory]
### BTCPayServer.Tests/NetworkExtensionsTests.cs
@@ -2,6 +2,7 @@
namespace BTCPayServer.Tests;
+[Trait("Fast", "Fast")]
public class NetworkExtensionsTests
{
[Theory]
### BTCPayServer.Tests/PSBTTests.cs
@@ -25,6 +25,7 @@ public async Task RejectsOversizedTextualPSBTBeforeParsing()
}
[Fact]
+ [Trait("Fast", "Fast")]
public void AddsWitnessUtxoToSegwitInputs()
{
var network = Network.RegTest;
### BTCPayServer.Tests/ReportsTests.cs
@@ -7,6 +7,7 @@
namespace BTCPayServer.Tests;
+[Trait("Fast", "Fast")]
public class ReportsTests
{
[Fact]
### BTCPayServer.Tests/RequestBaseUrlTests.cs
@@ -4,6 +4,7 @@
namespace BTCPayServer.Tests;
+[Trait("Fast", "Fast")]
public class RequestBaseUrlTests
{
[Theory]
### BTCPayServer.Tests/SSRFProtectionTests.cs
@@ -17,6 +17,7 @@
namespace BTCPayServer.Tests;
+[Trait("Fast", "Fast")]
public class SSRFProtectionTests
{
[Fact]
### BTCPayServer/Plugins/Maintenance/Components/MaintenanceCommands.razor
@@ -66,6 +66,9 @@
<button type="button" class="btn-close" aria-label="@StringLocalizer["Close"]" disabled="@_isRunning" @onclick="CloseDialog"></button>
</div>
<div class="modal-body">
+ <div class="alert alert-warning" role="alert">
+ @StringLocalizer["The server might restart while this command is running, interrupting the connection. If that happens, please refresh the page."]
+ </div>
<pre class="maintenance-commands__log bg-dark text-light rounded p-3 mb-3" aria-live="polite" @ref="_logElement"></pre>
<div class="alert @(_commandSucceeded ? "alert-success" : _isRunning ? "alert-info" : "alert-danger") mb-0" role="status">
@if (_isRunning)
### BTCPayServer/Plugins/Translations/Translations.Default.cs
@@ -1965,6 +1965,7 @@ static Translations()
"The seed was not found": "",
"The selected fee rate is too small. The minimum is {0} sat/byte": "",
"The server is already using this domain.": "",
+ "The server might restart while this command is running, interrupting the connection. If that happens, please refresh the page.": "",
"The specified amount with the specified currency, at the rate when the refund will be sent.": "",
"The store <strong>{0}</strong> will be permanently deleted. This action will also delete all invoices, apps and data associated with the store.": "",
"The store has been archived and will no longer appear in the stores list by default.": "",Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.