Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fixed `GET /api/mcp` hanging with zero bytes by returning `405 Method Not Allowed` per the MCP Streamable HTTP spec [#1064](https://github.com/sourcebot-dev/sourcebot/pull/1064)
- Fixed tokens with trailing newlines breaking git clone URLs by adding `.trim()` in `getTokenFromConfig()` [#1067](https://github.com/sourcebot-dev/sourcebot/pull/1067)

### Removed
- Removed "general" settings page with options to change organization name and domain. [#1065](https://github.com/sourcebot-dev/sourcebot/pull/1065)
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const getTokenFromConfig = async (token: Token): Promise<string> => {
throw new Error(`Environment variable ${token.env} not found.`);
}

return envToken;
return envToken.trim();
} else if ('googleCloudSecret' in token) {
try {
const client = new SecretManagerServiceClient();
Expand All @@ -119,7 +119,7 @@ export const getTokenFromConfig = async (token: Token): Promise<string> => {
throw new Error(`Secret ${token.googleCloudSecret} not found.`);
}

return response.payload.data.toString();
return response.payload.data.toString().trim();
} catch (error) {
throw new Error(`Failed to access Google Cloud secret ${token.googleCloudSecret}: ${error instanceof Error ? error.message : String(error)}`);
}
Expand Down
Loading