Skip to content

Commit bef0f8f

Browse files
author
Lluis Campos
authored
Merge pull request #1839 from nickanderson/ME-586/master
Handle invalid NO_PROXY setting containing comma
2 parents be32285 + c825b8f commit bef0f8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/client_shared/conf/conf.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ expected::ExpectedSize MenderConfig::ProcessCmdlineArgs(
288288
return expected::unexpected(proxy.error());
289289
}
290290

291+
if (http_client_config_.no_proxy.find(',') != string::npos) {
292+
return expected::unexpected(MakeError(
293+
ConfigErrorCode::InvalidOptionsError,
294+
"Unsupported syntax for NO_PROXY environment variable. Use space-separated values instead of coma-separated."));
295+
}
296+
291297
return opts_iter.GetPos();
292298
}
293299

0 commit comments

Comments
 (0)