2
0
mirror of https://github.com/boostorg/website.git synced 2026-02-25 16:52:13 +00:00

Make the submodule config parser a tad more liberal

Can still go wrong if the submodule name contains an equal sign or a
period, or the value contains a newline. But since this isn't dealing
with arbitrary data, that seems unlikely.
This commit is contained in:
Daniel James
2016-11-15 20:17:17 +00:00
parent 38ad1fa322
commit 047fed2c70

View File

@@ -45,8 +45,8 @@ class BoostSuperProject {
{
if (!$line) continue;
if (preg_match('@^submodule\.([\w/]+)\.(\w+)=(.*)$@', trim($line), $matches)) {
$modules[$matches[1]][$matches[2]] = $matches[3];
if (preg_match('@^submodule\.([^.=]+)\.([^.=]+)=(.*)$@i', trim($line), $matches)) {
$modules[$matches[1]][strtolower($matches[2])] = $matches[3];
}
else {
throw new BoostException("Unsupported config line: {$line}");