mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-26 18:35:43 +00:00
Fix OOB
This commit is contained in:
@@ -89,7 +89,7 @@ public class ContextualFileReference {
|
||||
public String serialize() {
|
||||
var start = getDataDir();
|
||||
var normalizedPath = normalized(path);
|
||||
if (normalizedPath.startsWith(start)) {
|
||||
if (normalizedPath.startsWith(start) && !normalizedPath.equals(start)) {
|
||||
return "<DATA>" + "/" + FileNames.relativize(start, normalizedPath);
|
||||
}
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user