Do not follow symbolic links when listing directory entries
@@ -1873,7 +1873,7 @@ public class SftpSubsystem
ServerSession session = getServerSession();
int maxDataSize =
PropertyResolverUtils.getIntProperty(session, MAX_READDIR_DATA_SIZE_PROP, DEFAULT_MAX_READDIR_DATA_SIZE);
- int count = doReadDir(id, handle, dh, reply, maxDataSize, options);
+ int count = doReadDir(id, handle, dh, reply, maxDataSize, IoUtils.getLinkOptions(false));
BufferUtils.updateLengthPlaceholder(reply, lenPos, count);
if ((!dh.isSendDot()) && (!dh.isSendDotDot()) && (!dh.hasNext())) {
dh.markDone();
