i2psnark: Improve path traversal checks part 3

Remove check for / in name in MetaInfo throwing exception,
now handled gracefully in Storage
This commit is contained in:
zzz committed 2026-09-08 13:51:38 -04:00
1 parent 0d801ffc99
commit b12dfad938
1 file changed
+3 -2
@@ -297,8 +297,9 @@ public class MetaInfo
throw new InvalidBEncodingException("Missing name string");
name = val.getString();
// We could silently replace the '/', but that messes up the info hash, so just throw instead.
if (name.indexOf('/') >= 0)
throw new InvalidBEncodingException("Invalid name containing '/' " + name);
// now handled in Storage
//if (name.indexOf('/') >= 0)
// throw new InvalidBEncodingException("Invalid name containing '/' " + name);
// BEP 27
val = info.get("private");