version 0.3.23
[fms.git] / src / http / pages / homepage.cpp
index a37d50f..ec4ea32 100644 (file)
@@ -19,7 +19,7 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m
        Option::Instance()->Get("FCPHost",fcphost);\r
        Option::Instance()->Get("FProxyPort",fproxyport);\r
 \r
-       if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown")\r
+       if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown" && ValidateFormPassword(queryvars))\r
        {\r
                m_log->trace("HomePage::GeneratePage requested shutdown");\r
                ((FMSApp *)&FMSApp::instance())->Terminate();\r
@@ -66,12 +66,16 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m
                        content+="You can see the release info <a href=\"versioninfo.htm?Major="+majorstr+"&Minor="+minorstr+"&Release="+releasestr+"\">here</a><br>";\r
                        showgenericupdate=false;\r
                }\r
+               else\r
+               {\r
+                       content+="<a href=\"versioninfo.htm\">Release info</a><br>";\r
+               }\r
 \r
        }\r
 \r
        if(showgenericupdate)\r
        {\r
-               content+="Check for new versions at the <a href=\"http://"+fcphost+":"+fproxyport+"/USK@0npnMrqZNKRCRoGojZV93UNHCMN-6UU3rRSAmP6jNLE,~BG-edFtdCC1cSH4O3BWdeIYa8Sw5DfyrSV-TKdO5ec,AQACAAE/fms/69/\">FMS Freesite</a><br>";\r
+               content+="Check for new versions at the <a href=\"http://"+fcphost+":"+fproxyport+"/"+FMS_FREESITE_USK+"\">FMS Freesite</a><br>";\r
        }\r
 \r
        content+="Use these pages to administer your FMS installation.";\r
@@ -94,6 +98,7 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m
 \r
        content+="<p class=\"paragraph\">";\r
        content+="<form name=\"frmshutdown\" method=\"POST\">";\r
+       content+=CreateFormPassword();\r
        content+="<input type=\"hidden\" name=\"formaction\" value=\"shutdown\">";\r
        content+="<input type=\"submit\" value=\"Shutdown FMS\">";\r
        content+="</form>";\r