diff --git a/bin/translation.php b/bin/translation.php index 5202b3f8a17ce09510d788f757fbc8f1fcf87f58..c68402003c972bef20c7e4c2e9cd130a4417c831 100755 --- a/bin/translation.php +++ b/bin/translation.php @@ -23,7 +23,7 @@ $translationconfig = SimpleSAML_Configuration::getConfig('translation.php'); $application = $translationconfig->getString('application', 'simplesamlphp'); $base = $translationconfig->getString('baseurl') . '/module.php/translationportal/'; -if (!preg_match('/^(.*?)(\.definition|translation)?\.(json|php)/', $file, $match)) +if (!preg_match('/^(.*?)(\.definition|\.translation)?\.(json|php)/', $file, $match)) throw new Exception('Illlegal file name. Must end on (definition|translation).json'); $fileWithoutExt = $match[1];