Index: trunk/htdocs/common/common.php
===================================================================
--- trunk/htdocs/common/common.php	(revision 1053)
+++ trunk/htdocs/common/common.php	(revision 1056)
@@ -67,4 +67,7 @@
 function xcache_validateFileName($name)
 {
+	if (!preg_match('!^[a-zA-Z0-9._-]+$!', $name)) {
+		var_dump($name);
+	}
 	return preg_match('!^[a-zA-Z0-9._-]+$!', $name);
 }
@@ -81,6 +84,10 @@
 		$lang = $langMap[$lang];
 	}
+	else if (!xcache_validateFileName($lang)) {
+		return null;
+	}
+
 	$file = "$name-$lang.lang.php";
-	if (xcache_validateFileName($file) && file_exists($file)) {
+	if (file_exists($file)) {
 		return $file;
 	}
@@ -236,5 +243,5 @@
 }
 
-include(get_language_file("common"));
+include(get_language_file("../common/common"));
 
 $modules = array();
