Skip to content

Commit 9a1540c

Browse files
Trim whitespace from command query parameter
1 parent 8d8af87 commit 9a1540c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const createTransport = async (req: express.Request): Promise<Transport> => {
181181
const transportType = query.transportType as string;
182182

183183
if (transportType === "stdio") {
184-
const command = query.command as string;
184+
const command = (query.command as string).trim();
185185
const origArgs = shellParseArgs(query.args as string) as string[];
186186
const queryEnv = query.env ? JSON.parse(query.env as string) : {};
187187
const env = { ...process.env, ...defaultEnvironment, ...queryEnv };

0 commit comments

Comments
 (0)