From: Amos Jeffries Date: Tue, 9 Feb 2016 13:35:45 +0000 (+1300) Subject: Bug 4429: http(s)_port options= error message missing characters X-Git-Tag: SQUID_4_0_5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=144acb4769c1ee34a3e6606b1a9e201e9cf98c46;p=thirdparty%2Fsquid.git Bug 4429: http(s)_port options= error message missing characters --- diff --git a/src/security/PeerOptions.cc b/src/security/PeerOptions.cc index 4861d0f4b9..5f21437d3f 100644 --- a/src/security/PeerOptions.cc +++ b/src/security/PeerOptions.cc @@ -430,12 +430,9 @@ Security::PeerOptions::parseOptions() SBuf option; long value = 0; - if (tok.int64(hex, 16, false)) { - /* Special case.. hex specification */ - value = hex; - } + // Bug 4429: identify the full option name before determining text or numeric + if (tok.prefix(option, optChars)) { - else if (tok.prefix(option, optChars)) { // find the named option in our supported set for (struct ssl_option *opttmp = ssl_options; opttmp->name; ++opttmp) { if (option.cmp(opttmp->name) == 0) { @@ -443,6 +440,12 @@ Security::PeerOptions::parseOptions() break; } } + + // Special case.. hex specification + ::Parser::Tokenizer tmp(option); + if (!value && tmp.int64(hex, 16, false) && tmp.atEnd()) { + value = hex; + } } if (value) {