Remove old Android leftovers (#4722)
This commit is contained in:
@@ -143,7 +143,7 @@ void cWebAdmin::Stop(void)
|
||||
|
||||
bool cWebAdmin::LoadLoginPage(void)
|
||||
{
|
||||
cFile File(FILE_IO_PREFIX "webadmin/login_template.html", cFile::fmRead);
|
||||
cFile File("webadmin/login_template.html", cFile::fmRead);
|
||||
if (!File.IsOpen())
|
||||
{
|
||||
return false;
|
||||
@@ -198,16 +198,16 @@ void cWebAdmin::Reload(void)
|
||||
}
|
||||
m_TemplateScript.Create();
|
||||
m_TemplateScript.RegisterAPILibs();
|
||||
if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua"))
|
||||
if (!m_TemplateScript.LoadFile("webadmin/template.lua"))
|
||||
{
|
||||
LOGWARN("Could not load WebAdmin template \"%s\". WebAdmin will not work properly!", FILE_IO_PREFIX "webadmin/template.lua");
|
||||
LOGWARN("Could not load WebAdmin template \"%s\". WebAdmin will not work properly!", "webadmin/template.lua");
|
||||
m_TemplateScript.Close();
|
||||
}
|
||||
|
||||
// Load the login template, provide a fallback default if not found:
|
||||
if (!LoadLoginPage())
|
||||
{
|
||||
LOGWARN("Could not load WebAdmin login page \"%s\", using fallback template.", FILE_IO_PREFIX "webadmin/login_template.html");
|
||||
LOGWARN("Could not load WebAdmin login page \"%s\", using fallback template.", "webadmin/login_template.html");
|
||||
|
||||
// Set the fallback:
|
||||
m_LoginPage = \
|
||||
@@ -378,7 +378,7 @@ void cWebAdmin::HandleFileRequest(cHTTPServerConnection & a_Connection, cHTTPInc
|
||||
// Read the file contents and guess its mime-type, based on the extension:
|
||||
AString Content = "<h2>404 Not Found</h2>";
|
||||
AString ContentType = "text/html";
|
||||
AString Path = Printf(FILE_IO_PREFIX "webadmin/files/%s", FileURL.c_str());
|
||||
AString Path = Printf("webadmin/files/%s", FileURL.c_str());
|
||||
|
||||
// Return 404 if the file is not found, or the URL contains '../' (for security reasons)
|
||||
if ((FileURL.find("../") == AString::npos) && cFile::IsFile(Path))
|
||||
|
||||
Reference in New Issue
Block a user