Skip to content

Commit e842e3c

Browse files
Update lib/mcp/server.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9dea47b commit e842e3c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/mcp/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ function createTransport(options = {}) {
347347
}
348348

349349
async function tailFile(filePath, lineCount) {
350-
const fh = await fs.promises.open(filePath, 'r');
350+
const safePath = validateLogFilePath(filePath);
351+
const fh = await fs.promises.open(safePath, 'r');
351352
try {
352353
const stats = await fh.stat();
353354
let position = stats.size;

0 commit comments

Comments
 (0)