Skip to content

Commit dae02c8

Browse files
fix: prevent log injection
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent a573db5 commit dae02c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/hoppscotch-backend/src/mock-server/mock-request.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class MockRequestGuard implements CanActivate {
4747

4848
if (E.isLeft(mockServerResult)) {
4949
console.warn(
50-
`Mock server lookup failed for subdomain: ${mockServerSubdomain}, error: ${mockServerResult.left}`,
50+
`Mock server lookup failed for subdomain: ${String(mockServerSubdomain).replace(/\r|\n/g, "")}, error: ${mockServerResult.left}`,
5151
);
5252
throw new NotFoundException(
5353
`Mock server '${mockServerSubdomain}' not found`,

0 commit comments

Comments
 (0)