Skip to content

Commit 70ffe4a

Browse files
feat: enable connection encryption by default
BREAKING CHANGE: If no `encrypt` setting was specified before, `tedious` would fall back to not using any encryption by default. This changes the default to encrypt connections unless `encrypt` is explicitly set to `false`. This _should_ work without issues with most SQL Server setups, but might cause connections to fail if encryption between `tedious` and SQL Server can not be established.
1 parent d40ee8b commit 70ffe4a

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎.travis.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ jobs:
7171
"userName": "'${AZURE_USERNAME}'",
7272
"password": "'${AZURE_PASS}'",
7373
"options": {
74-
"database": "test",
75-
"encrypt": true
74+
"database": "test"
7675
}
7776
}
7877
}' > ~/.tedious/test-connection.json
@@ -95,8 +94,7 @@ jobs:
9594
}
9695
},
9796
"options": {
98-
"database": "test",
99-
"encrypt": true
97+
"database": "test"
10098
}
10199
}
102100
}' > ~/.tedious/test-connection.json

‎src/connection.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ class Connection extends EventEmitter {
444444

445445
this.config.options.encrypt = config.options.encrypt;
446446
} else {
447-
deprecate('The default value for `options.encrypt` will change from `false` to `true`. Please pass `false` explicitly if you want to retain current behaviour.');
448-
this.config.options.encrypt = false;
447+
this.config.options.encrypt = true;
449448
}
450449

451450
if (config.options.fallbackToDefaultDb !== undefined) {

0 commit comments

Comments
 (0)