szetszwo commented on PR #1268:
URL: https://github.com/apache/ratis/pull/1268#issuecomment-2899498629
Tested with liuhuajin's poc code. It will get an exception after this
change.
```java
2025-05-21 16:17:07,381 [NettyRpcService-workerGroup--thread1] ERROR
impl.SnapshotInstallationHandler
(SnapshotInstallationHandler.java:installSnapshot(109)) -
n0@group-8C24DD507E19: installSnapshot failed
java.io.IOException: The dir is not an ancestor of the full path:
dir=/___/ratis-server/./ratis-examples/target/n0/4e6ee67d-10e6-47fd-a887-8c24dd507e19,
sub=../../../../foo,
full=/___/ratis-server/./ratis-examples/target/n0/4e6ee67d-10e6-47fd-a887-8c24dd507e19/../../../../foo
at org.apache.ratis.util.FileUtils.resolveFullPath(FileUtils.java:91)
at
org.apache.ratis.server.storage.SnapshotManager.lambda$new$5(SnapshotManager.java:76)
at
org.apache.ratis.server.storage.SnapshotManager.installSnapshot(SnapshotManager.java:124)
at
org.apache.ratis.server.impl.ServerState.installSnapshot(ServerState.java:460)
at
org.apache.ratis.server.impl.SnapshotInstallationHandler.checkAndInstallSnapshot(SnapshotInstallationHandler.java:217)
at
org.apache.ratis.server.impl.SnapshotInstallationHandler.installSnapshotImpl(SnapshotInstallationHandler.java:132)
at
org.apache.ratis.server.impl.SnapshotInstallationHandler.installSnapshot(SnapshotInstallationHandler.java:107)
at
org.apache.ratis.server.impl.RaftServerImpl.installSnapshot(RaftServerImpl.java:1747)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]