-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I have a few vhosts that use the SSLRequireSSL directive (https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslrequiressl).
This directive is used as is. There are no parameters, no on/off. It's just a line inside a vhosts that states: SSLRequireSSL. Nothing else.
When you have a config file that has this it fails to parse. You get "Apache config format error!".
This is caused by the regex in ConfigType/Apache.php which expects a whitespace and then some more things which isn't there.
if (preg_match('/^\s*(\w+)(?:\s+(.*?)|)\s*$/', $configLine, $configMatches)) { // Property
if (!isset($configMatches[2])) {
throw new \UnexpectedValueException("Apache config format error!");
}
if ($level === 0) {
$block[$configMatches[1]] = $configMatches[2];
$result = $this->append($block, $result);
$block = array();
} else {
$blockIn[$configMatches[1]] = $configMatches[2];
$blockChild = $this->append($blockIn, $blockChild);
$blockIn = array();
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels