Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

encodeURI

Matheus Nogueirac841b72a4f62
diff --git a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts
index 561cdaaed7..69a6364b7e 100644
--- a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts
+++ b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts
@@ -31,7 +31,7 @@ const $createApiKey = async (
): Promise<{ keyId: string; apiKey: string }> => {
try {
const { data } = await request.post<TFireworksCreateApiKeyResponse>(
- `${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}/users/${userId}/apiKeys`,
+ `${FIREWORKS_API_BASE_URL}/v1/accounts/${encodeURIComponent(accountId)}/users/${encodeURIComponent(userId)}/apiKeys`,
{ apiKey: { displayName } },
{
headers: {
@@ -59,7 +59,7 @@ const $createApiKey = async (
const $checkApiKey = async (generatedApiKey: string, accountId: string): Promise<void> => {
try {
- await request.get(`${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}`, {
+ await request.get(`${FIREWORKS_API_BASE_URL}/v1/accounts/${encodeURIComponent(accountId)}`, {
headers: {
Authorization: `Bearer ${generatedApiKey}`
}
@@ -74,7 +74,7 @@ const $checkApiKey = async (generatedApiKey: string, accountId: string): Promise
const $deleteApiKey = async (authKey: string, accountId: string, userId: string, keyId: string): Promise<void> => {
try {
await request.post(
- `${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}/users/${userId}/apiKeys:delete`,
+ `${FIREWORKS_API_BASE_URL}/v1/accounts/${encodeURIComponent(accountId)}/users/${encodeURIComponent(userId)}/apiKeys:delete`,
{ keyId },
{
headers: {
diff --git a/backend/src/services/app-connection/fireworks/fireworks-connection-fns.ts b/backend/src/services/app-connection/fireworks/fireworks-connection-fns.ts
index 57ca93d781..5eac622a4e 100644
--- a/backend/src/services/app-connection/fireworks/fireworks-connection-fns.ts
+++ b/backend/src/services/app-connection/fireworks/fireworks-connection-fns.ts
@@ -19,7 +19,7 @@ export const validateFireworksConnectionCredentials = async (config: TFireworksC
const { apiKey, accountId } = config.credentials;
try {
- await request.get(`${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}`, {
+ await request.get(`${FIREWORKS_API_BASE_URL}/v1/accounts/${encodeURIComponent(accountId)}`, {
headers: {
Authorization: `Bearer ${apiKey}`
},
@@ -47,7 +47,7 @@ export const listFireworksUsers = async (appConnection: TFireworksConnection) =>
const { apiKey, accountId } = appConnection.credentials;
const { data } = await request.get<{ users: TFireworksUser[] }>(
- `${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}/users`,
+ `${FIREWORKS_API_BASE_URL}/v1/accounts/${encodeURIComponent(accountId)}/users`,
{
headers: {
Authorization: `Bearer ${apiKey}`