Fix stackoverflow for some elevation requests

This commit is contained in:
crschnick
2025-03-17 06:43:34 +00:00
parent 51c8fff9bd
commit 4ecc55443a
2 changed files with 6 additions and 7 deletions
@@ -3,7 +3,6 @@ package io.xpipe.app.util;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.core.process.CountDown;
import io.xpipe.core.process.ElevationHandler;
import io.xpipe.core.process.ShellControl;
import io.xpipe.core.store.DataStore;
import io.xpipe.core.util.SecretReference;
@@ -21,7 +20,7 @@ public class BaseElevationHandler implements ElevationHandler {
}
@Override
public boolean handleRequest(ShellControl parent, UUID requestId, CountDown countDown, boolean confirmIfNeeded) {
public boolean handleRequest(UUID requestId, CountDown countDown, boolean confirmIfNeeded, boolean interactive) {
var ref = getSecretRef();
if (ref == null) {
return false;
@@ -35,7 +34,7 @@ public class BaseElevationHandler implements ElevationHandler {
List.of(),
List.of(),
countDown,
parent.isInteractive());
interactive);
return true;
}
@@ -11,9 +11,9 @@ public interface ElevationHandler {
@Override
public boolean handleRequest(
ShellControl parent, UUID requestId, CountDown countDown, boolean confirmIfNeeded) {
var r = ElevationHandler.this.handleRequest(parent, requestId, countDown, confirmIfNeeded);
return r || other.handleRequest(parent, requestId, countDown, confirmIfNeeded);
UUID requestId, CountDown countDown, boolean confirmIfNeeded, boolean interactive) {
var r = ElevationHandler.this.handleRequest(requestId, countDown, confirmIfNeeded, interactive);
return r || other.handleRequest(requestId, countDown, confirmIfNeeded, interactive);
}
@Override
@@ -24,7 +24,7 @@ public interface ElevationHandler {
};
}
boolean handleRequest(ShellControl parent, UUID requestId, CountDown countDown, boolean confirmIfNeeded);
boolean handleRequest(UUID requestId, CountDown countDown, boolean confirmIfNeeded, boolean interactive);
SecretReference getSecretRef();
}