mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 11:20:34 +00:00
Fix stackoverflow for some elevation requests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user