Skip to content

Commit 89383dc

Browse files
committed
fix(mssql-driver): Fix domain passed as an empty string case: ConnectionError: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication
1 parent 06f36fb commit 89383dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/cubejs-mssql-driver/driver/MSSqlDriver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class MSSqlDriver extends BaseDriver {
1010
port: process.env.CUBEJS_DB_PORT && parseInt(process.env.CUBEJS_DB_PORT, 10),
1111
user: process.env.CUBEJS_DB_USER,
1212
password: process.env.CUBEJS_DB_PASS,
13-
domain: process.env.CUBEJS_DB_DOMAIN,
13+
domain: process.env.CUBEJS_DB_DOMAIN && process.env.CUBEJS_DB_DOMAIN.trim().length > 0 ?
14+
process.env.CUBEJS_DB_DOMAIN : undefined,
1415
requestTimeout: 10 * 60 * 1000, // 10 minutes
1516
options: {
1617
encrypt: !!process.env.CUBEJS_DB_SSL || false

0 commit comments

Comments
 (0)