Skip to content

Commit

Permalink
Encode password
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoVictor committed Jul 10, 2024
1 parent ec490ba commit 5b2acd7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/infra/database/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ const manager = {
}

const { username, password } = await secretManager.getSecret(
process.env.CLUSTER_SECRET_ID
env.CLUSTER_SECRET_ID
);
return `postgresql://${username}:${password}@${process.env.CLUSTER_URL}/coderunner?schema=public`;
const encoded = encodeURIComponent(password);

return `postgresql://${username}:${encoded}@${env.CLUSTER_URL}/coderunner?schema=public`;
},
connect: async () => {
if (!manager.client) {
Expand Down

0 comments on commit 5b2acd7

Please sign in to comment.