Commit 63c21881 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1089 Regexp for database name should check the whole name.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 9d3c7109
......@@ -84,7 +84,7 @@ class SqlStateMachine implements IStateMachine {
throw new FatalMisconfigurationException("SqlStateMachine(): missing configuration for the state sql. Check STATE_SQL_* values in the configuration.");
}
if (!preg_match('/[0-9a-zA-Z$_]+/', STATE_SQL_DATABASE)) {
if (!preg_match('/^[0-9a-zA-Z$_]+$/', STATE_SQL_DATABASE)) {
throw new FatalMisconfigurationException(sprintf("SqlStateMachine(): invalid database name '%s'. The name may contain ASCII 7bit letters, numbers and the '$' and '_' signs. Please change your configuration.", STATE_SQL_DATABASE));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment