summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-03-02 13:19:28 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-03-02 19:59:14 +0100
commit668e0c6ed9778fe06c13d6586d13dbffcb70635f (patch)
treec40013259dd46b661587f68cf96f147cae35f867
parent62c82f7a111293e71eeda120cf9f2da47efd1c63 (diff)
downloadmullvadvpn-668e0c6ed9778fe06c13d6586d13dbffcb70635f.tar.xz
mullvadvpn-668e0c6ed9778fe06c13d6586d13dbffcb70635f.zip
Add extra newline to .mullvad_rpc_address
-rw-r--r--app/lib/backend.js2
-rw-r--r--mullvad-daemon/src/rpc_info.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js
index 00c40fa05f..45a91a9a50 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -72,7 +72,7 @@ export type IpcCredentials = {
};
export function parseIpcCredentials(data: string): ?IpcCredentials {
const [connectionString, sharedSecret] = data.split('\n', 2);
- if(connectionString && sharedSecret) {
+ if(connectionString && sharedSecret !== undefined) {
return {
connectionString,
sharedSecret,
diff --git a/mullvad-daemon/src/rpc_info.rs b/mullvad-daemon/src/rpc_info.rs
index cf9951fc98..b5b35fa8f7 100644
--- a/mullvad-daemon/src/rpc_info.rs
+++ b/mullvad-daemon/src/rpc_info.rs
@@ -31,7 +31,7 @@ lazy_static! {
/// Writes down the RPC connection info to some API to a file.
pub fn write(rpc_address: &str, shared_secret: &str) -> Result<()> {
open_file(RPC_ADDRESS_FILE_PATH.as_path())
- .and_then(|mut file| write!(file, "{}\n{}", rpc_address, shared_secret))
+ .and_then(|mut file| write!(file, "{}\n{}\n", rpc_address, shared_secret))
.chain_err(|| ErrorKind::WriteFailed(RPC_ADDRESS_FILE_PATH.to_owned()))?;
debug!(