Skip to content

Commit

Permalink
Merge branch '1.6.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthGandalf committed Apr 16, 2015
2 parents 9269893 + 0167a82 commit 0b205db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/ClientCommand.cpp
Expand Up @@ -1625,16 +1625,14 @@ static void AddCommandHelp(CTable& Table, const CString& sCmd, const CString& sA
{
if (sFilter.empty() || sCmd.StartsWith(sFilter) || sCmd.AsLower().WildCmp(sFilter.AsLower())) {
Table.AddRow();
Table.SetCell("Command", sCmd);
Table.SetCell("Arguments", sArgs);
Table.SetCell("Command", sCmd + " " + sArgs);
Table.SetCell("Description", sDesc);
}
}

void CClient::HelpUser(const CString& sFilter) {
CTable Table;
Table.AddColumn("Command");
Table.AddColumn("Arguments");
Table.AddColumn("Description");

if (sFilter.empty()) {
Expand Down
10 changes: 9 additions & 1 deletion src/HTTPSock.cpp
Expand Up @@ -136,7 +136,7 @@ void CHTTPSock::ReadLine(const CString& sData) {
sLine.Token(2).Base64Decode(sUnhashed);
m_sUser = sUnhashed.Token(0, false, ":");
m_sPass = sUnhashed.Token(1, true, ":");
m_bLoggedIn = OnLogin(m_sUser, m_sPass, true);
// Postpone authorization attempt until end of headers, because cookies should be read before that, otherwise session id will be overwritten in GetSession()
} else if (sName.Equals("Content-Length:")) {
m_uPostLen = sLine.Token(1).ToULong();
if (m_uPostLen > MAX_POST_SIZE)
Expand Down Expand Up @@ -184,6 +184,14 @@ void CHTTPSock::ReadLine(const CString& sData) {
} else if (sLine.empty()) {
m_bGotHeader = true;

if (!m_sUser.empty()) {
m_bLoggedIn = OnLogin(m_sUser, m_sPass, true);
if (!m_bLoggedIn) {
// Error message already was sent
return;
}
}

if (m_bPost) {
m_sPostData = GetInternalReadBuffer();
CheckPost();
Expand Down
1 change: 0 additions & 1 deletion src/WebModules.cpp
Expand Up @@ -473,7 +473,6 @@ CWebSock::EPageReqResult CWebSock::PrintTemplate(const CString& sPageName, CStri
m_Template["PageName"] = sPageName;

if (pModule) {
CUser* pUser = pModule->GetUser();
m_Template["ModName"] = pModule->GetModName();

if (m_Template.find("Title") == m_Template.end()) {
Expand Down

0 comments on commit 0b205db

Please sign in to comment.