diff --git a/EduNetworkBuilder/PersonClass.cs b/EduNetworkBuilder/PersonClass.cs
index 8de8a33..55bf5a7 100644
--- a/EduNetworkBuilder/PersonClass.cs
+++ b/EduNetworkBuilder/PersonClass.cs
@@ -65,6 +65,12 @@ namespace EduNetworkBuilder
public PersonClass(string Filename)
{
Load(Filename);
+ string FileAndExtension = Path.GetFileName(Filename);
+ string JustFile = Path.GetFileNameWithoutExtension(Filename);
+ if(UserName != JustFile)
+ {
+ throw new Exception(string.Format(NB.Translate("PPF_TamperedFile"), FileAndExtension, UserName));
+ }
}
public PersonClass(XmlNode reader)
{
diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx
index 98309a8..9c2b67c 100644
--- a/EduNetworkBuilder/Resources/languages/edustrings.resx
+++ b/EduNetworkBuilder/Resources/languages/edustrings.resx
@@ -1857,6 +1857,10 @@
Stats: {0} Students {1} New Files {2} Skipped (already existed)
PPF_StudentWriteStats Stats: {0} Students {1} New Files {2} Skipped (already existed)
+
+ The filename (without extension) did not match the username to which it was assigned. The file has been tampered with and is considered invalid. Filename: {0} Username: {1}
+ PPF_TamperedFile = The filename (without extension) did not match the username to which it was assigned. The file has been tampered with and is considered invalid. Filename: {0} Username: {1}
+
User File Directory
PPF_UserDirectory