Fix encryption logic (#4672)
Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
co-authored by
Thomas Trompette
parent
d4eb75abff
commit
f08dfec00a
-2
@@ -53,8 +53,6 @@ export class RemoteServerService<T extends RemoteServerType> {
|
||||
const encryptedPassword = await encryptText(
|
||||
remoteServerInput.userMappingOptions.password,
|
||||
key,
|
||||
// TODO: check if we should use a separated IV
|
||||
key,
|
||||
);
|
||||
|
||||
remoteServerToCreate = {
|
||||
|
||||
+1
-5
@@ -17,11 +17,7 @@ export const buildPostgresUrl = (
|
||||
const foreignDataWrapperOptions = remoteServer.foreignDataWrapperOptions;
|
||||
const userMappingOptions = remoteServer.userMappingOptions;
|
||||
|
||||
const password = decryptText(
|
||||
userMappingOptions.password,
|
||||
secretKey,
|
||||
secretKey,
|
||||
);
|
||||
const password = decryptText(userMappingOptions.password, secretKey);
|
||||
|
||||
const url = `postgres://${userMappingOptions.username}:${password}@${foreignDataWrapperOptions.host}:${foreignDataWrapperOptions.port}/${foreignDataWrapperOptions.dbname}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user