Skip to content

Commit

Permalink
Fixed double html escaping on text files + always overwrite EULA file
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Aug 4, 2016
1 parent e87c773 commit 08a67ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -21,7 +21,7 @@ Typos? [Go here.](https://github.com/DoubleDoorDevelopment/D3Backend/issues/10)
1. Tell us what you clicked exactly (if applicable)
1. If we ask you for more information and you don't replay within 14 days, the issue will be considerer inactive.

ToDO
ToDo
----

- [ ] Implement email system
Expand Down
Expand Up @@ -225,7 +225,7 @@ public String getFileContents() throws IOException
case "lock":
return null;
default:
return StringEscapeUtils.escapeHtml4(FileUtils.readFileToString(file));
return FileUtils.readFileToString(file);
}
}

Expand Down
23 changes: 10 additions & 13 deletions src/main/java/net/doubledoordev/backend/server/Server.java
Expand Up @@ -880,20 +880,17 @@ public void startServer() throws Exception
for (String blocked : SERVER_START_ARGS_BLACKLIST_PATTERNS) if (getJvmData().extraMCParameters.contains(blocked)) throw new Exception("JVM/MC options contain a blocked option: " + blocked);

File eula = new File(getFolder(), "eula.txt");
if (!eula.exists())
try
{
try
{
FileUtils.writeStringToFile(eula, "#The server owner indicated to agree with the EULA when submitting the from that produced this server instance.\n" +
"#That means that there is no need for extra halting of the server startup sequence with this stupid file.\n" +
"#" + new Date().toString() + "\n" +
"eula=true\n");
}
catch (IOException e)
{
printLine("Error making the eula file....");
e.printStackTrace();
}
FileUtils.writeStringToFile(eula, "#The server owner indicated to agree with the EULA when submitting the from that produced this server instance.\n" +
"#That means that there is no need for extra halting of the server startup sequence with this stupid file.\n" +
"#" + new Date().toString() + "\n" +
"eula=true\n");
}
catch (IOException e)
{
printLine("Error making the eula file....");
e.printStackTrace();
}

new Thread(new Runnable()
Expand Down

0 comments on commit 08a67ed

Please sign in to comment.