From b960d78d9e84d1d49be16a651d5ce9939b6b4149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Thu, 4 Dec 2014 14:23:13 +0200 Subject: [PATCH 1/6] web: fix SQL injection in remote job submission --- html/user/submit_rpc_handler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php index ed72f4af4a..0197bf6474 100644 --- a/html/user/submit_rpc_handler.php +++ b/html/user/submit_rpc_handler.php @@ -302,6 +302,7 @@ function submit_batch($r) { if (!$ret) xml_error(-1, "BOINC server: batch->update() failed"); } else { $batch_name = (string)($r->batch->batch_name); + $batch_name = BoincDb::escape_string($batch_name); $batch_id = BoincBatch::insert( "(user_id, create_time, njobs, name, app_id, logical_end_time, state) values ($user->id, $now, $njobs, '$batch_name', $app->id, $let, ".BATCH_STATE_INIT.")" ); From 46225efdf6c68dca9ed01706e05a198fe8904b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Thu, 4 Dec 2014 14:37:03 +0200 Subject: [PATCH 2/6] web: one more injection in remote job submission --- html/user/submit_rpc_handler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php index 0197bf6474..8582bdd778 100644 --- a/html/user/submit_rpc_handler.php +++ b/html/user/submit_rpc_handler.php @@ -343,6 +343,7 @@ function create_batch($r) { list($user, $user_submit) = authenticate_user($r, $app); $now = time(); $batch_name = (string)($r->batch->batch_name); + $batch_name = BoincDb::escape_string($batch_name); $expire_time = (double)($r->expire_time); $batch_id = BoincBatch::insert( "(user_id, create_time, name, app_id, state, expire_time) values ($user->id, $now, '$batch_name', $app->id, ".BATCH_STATE_INIT.", $expire_time)" From 2679e1360546b77e57b141c8b393009eff851d0a Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 4 Dec 2014 06:01:15 -0800 Subject: [PATCH 3/6] MGR: Allow user to change order of columns in Projects, Tasks and Transfers tabs (currently implemented by wxWidgets only for MS Windows.) --- clientgui/BOINCBaseView.cpp | 69 +++++++++++++++++++++++++++++++++++++ clientgui/BOINCBaseView.h | 6 +++- clientgui/ViewProjects.cpp | 6 ++++ clientgui/ViewTransfers.cpp | 7 ++++ clientgui/ViewWork.cpp | 35 +++++++++++++++++++ 5 files changed, 122 insertions(+), 1 deletion(-) diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index 287577af86..ebf6d33a12 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -316,6 +316,25 @@ bool CBOINCBaseView::OnSaveState(wxConfigBase* pConfig) { bReturnValue = false; } + // Save Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + wxString strBuffer; + wxArrayInt aOrder(m_pListPane->GetColumnCount()); + + aOrder = m_pListPane->GetColumnsOrder(); + + strColumnOrder.Printf(wxT("%s"), m_aStdColNameOrder->Item(aOrder[0])); + + for (int i = 1; i < aOrder.Count(); ++i) + { + strBuffer.Printf(wxT(";%s"), m_aStdColNameOrder->Item(aOrder[i])); + strColumnOrder += strBuffer; + } + + pConfig->Write(wxT("ColumnOrder"), strColumnOrder); +#endif + return bReturnValue; } @@ -332,6 +351,16 @@ bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) { if (!m_pListPane->OnRestoreState(pConfig)) { return false; } + + // Restore Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + + if (pConfig->Read(wxT("ColumnOrder"), &strColumnOrder)) { + SetListColumnOrder(strColumnOrder, ";"); + } +#endif + return true; } @@ -783,6 +812,46 @@ void CBOINCBaseView::RefreshTaskPane() { } +void CBOINCBaseView::TokenizedStringToArray(wxString tokenized, char * delimiters, wxArrayString* array) { + wxString name; + + array->Clear(); + wxStringTokenizer tok(tokenized, delimiters); + while (tok.HasMoreTokens()) + { + name = tok.GetNextToken(); + if (name.IsEmpty()) continue; + array->Add(name); + } +} + + +void CBOINCBaseView::SetListColumnOrder(wxString tokenized, char * delimiters) { +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxArrayString orderArray; + int i, j, stdCount, orderCount; + int colCount = m_pListPane->GetColumnCount(); + wxArrayInt aOrder(colCount); + + TokenizedStringToArray(tokenized, delimiters, &orderArray); + stdCount = m_aStdColNameOrder->GetCount(); + wxASSERT(stdCount == colCount); + + orderCount = orderArray.GetCount(); + wxASSERT(orderCount == colCount); // Temporary until selective hiding implemented + + for (i=0; iItem(j))) { + aOrder[i] = j; + } + } + } + m_pListPane->SetColumnsOrder(aOrder); +#endif +} + + #ifdef __WXMAC__ // Fix Keyboard navigation on Mac // diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index 0b40d84072..d8377936b4 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -124,6 +124,9 @@ public: void ClearSavedSelections(); void ClearSelections(); void RefreshTaskPane(); + + void TokenizedStringToArray(wxString tokenized, char * delimiters, wxArrayString* array); + void SetListColumnOrder(wxString tokenized, char * delimiters); #ifdef __WXMAC__ CBOINCListCtrl* GetListCtrl() { return m_pListPane; } @@ -134,7 +137,8 @@ public: int m_iSortColumn; bool m_bReverseSort; - + wxArrayString* m_aStdColNameOrder; + private: wxArrayString m_arrSelectedKeys1; //array for remembering the current selected rows by primary key column value diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index f978343577..f28a0fca49 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -34,6 +34,9 @@ #include "res/proj.xpm" +// This string must contain internal (non-localized) column names +// in standard order separated by a delimiter +static char* default_column_names = "Project;Account;Team;Done;Average;Share;Status"; #define COLUMN_PROJECT 0 #define COLUMN_ACCOUNTNAME 1 @@ -220,6 +223,9 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) : // Create Task Pane Items m_pTaskPane->UpdateControls(); + m_aStdColNameOrder = new wxArrayString; + TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 150); m_pListPane->InsertColumn(COLUMN_ACCOUNTNAME, _("Account"), wxLIST_FORMAT_LEFT, 80); diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index 07376260b1..c578f416cb 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -34,6 +34,10 @@ #include "res/xfer.xpm" +// This string must contain internal (non-localized) column names +// in standard order separated by a delimiter +static char* default_column_names = "Project;File;Progress;Size;Elapsed;Speed;Status"; + #define COLUMN_PROJECT 0 #define COLUMN_FILE 1 #define COLUMN_PROGRESS 2 @@ -183,6 +187,9 @@ CViewTransfers::CViewTransfers(wxNotebook* pNotebook) : // Create Task Pane Items m_pTaskPane->UpdateControls(); + m_aStdColNameOrder = new wxArrayString; + TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125); m_pListPane->InsertColumn(COLUMN_FILE, _("File"), wxLIST_FORMAT_LEFT, 205); diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 9905fd2f7f..26eb9a99df 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -36,6 +36,10 @@ #include "res/result.xpm" +// This string must contain internal (non-localized) column names +// in standard order separated by a delimiter +static char* default_column_names = "Project;Progress;Status;Elapsed;Remaining;Deadline;Application;Name"; + #define COLUMN_PROJECT 0 #define COLUMN_PROGRESS 1 #define COLUMN_STATUS 2 @@ -233,6 +237,9 @@ CViewWork::CViewWork(wxNotebook* pNotebook) : // Create Task Pane Items m_pTaskPane->UpdateControls(); + m_aStdColNameOrder = new wxArrayString; + TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125); m_pListPane->InsertColumn(COLUMN_PROGRESS, _("Progress"), wxLIST_FORMAT_RIGHT, 60); @@ -560,6 +567,25 @@ bool CViewWork::OnSaveState(wxConfigBase* pConfig) { pConfig->SetPath(strBaseConfigLocation); pConfig->Write(wxT("ActiveTasksOnly"), (pDoc->m_ActiveTasksOnly ? 1 : 0)); + // Save Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + wxString strBuffer; + wxArrayInt aOrder(m_pListPane->GetColumnCount()); + + aOrder = m_pListPane->GetColumnsOrder(); + + strColumnOrder.Printf(wxT("%s"), m_aStdColNameOrder->Item(aOrder[0])); + + for (int i = 1; i < aOrder.Count(); ++i) + { + strBuffer.Printf(wxT(";%s"), m_aStdColNameOrder->Item(aOrder[i])); + strColumnOrder += strBuffer; + } + + pConfig->Write(wxT("ColumnOrder"), strColumnOrder); +#endif + return bReturnValue; } @@ -587,6 +613,15 @@ bool CViewWork::OnRestoreState(wxConfigBase* pConfig) { pConfig->Read(wxT("ActiveTasksOnly"), &iTempValue, 0); pDoc->m_ActiveTasksOnly = (iTempValue != 0); + // Restore Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + + if (pConfig->Read(wxT("ColumnOrder"), &strColumnOrder)) { + SetListColumnOrder(strColumnOrder, ";"); + } +#endif + return true; } From bdc530b0f6f5ffaa0c12803108c3acc6be10e864 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 5 Dec 2014 04:37:07 -0800 Subject: [PATCH 4/6] MGR: Consolidate code to change column order. Add function to restore default column order. --- clientgui/AdvancedFrame.cpp | 26 +++++++++++ clientgui/AdvancedFrame.h | 1 + clientgui/BOINCBaseView.cpp | 70 ----------------------------- clientgui/BOINCBaseView.h | 6 +-- clientgui/BOINCListCtrl.cpp | 90 ++++++++++++++++++++++++++++++++++++- clientgui/BOINCListCtrl.h | 4 ++ clientgui/ViewProjects.cpp | 2 +- clientgui/ViewTransfers.cpp | 2 +- clientgui/ViewWork.cpp | 30 +------------ 9 files changed, 124 insertions(+), 107 deletions(-) diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index af0cc5749d..fc629a8892 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -37,6 +37,7 @@ #include "MainDocument.h" #include "BOINCBaseFrame.h" #include "BOINCBaseView.h" +#include "BOINCListCtrl.h" #include "BOINCTaskBar.h" #include "BOINCClientManager.h" #include "BOINCDialupManager.h" @@ -1044,6 +1045,31 @@ void CAdvancedFrame::SaveWindowDimensions() { } +void CAdvancedFrame::RestoreStandardListColumns() { + wxWindow* pwndNotebookPage = NULL; + CBOINCBaseView* pView = NULL; + long iIndex; + long iPageCount; + + // Convert to a zero based index + iPageCount = (long)m_pNotebook->GetPageCount() - 1; + + for (iIndex = 0; iIndex <= iPageCount; iIndex++) { + + pwndNotebookPage = m_pNotebook->GetPage(iIndex); + wxASSERT(wxDynamicCast(pwndNotebookPage, CBOINCBaseView)); + + pView = wxDynamicCast(pwndNotebookPage, CBOINCBaseView); + wxASSERT(pView); + + CBOINCListCtrl* listPane = pView->GetListCtrl(); + if (listPane) { + listPane->SetStandardColumnOrder(); + } + } +} + + void CAdvancedFrame::OnSize(wxSizeEvent& event) { SaveWindowDimensions(); event.Skip(); diff --git a/clientgui/AdvancedFrame.h b/clientgui/AdvancedFrame.h index dea1b1cd7a..085466c42b 100644 --- a/clientgui/AdvancedFrame.h +++ b/clientgui/AdvancedFrame.h @@ -101,6 +101,7 @@ public: bool RestoreState(); bool SaveState(); + void RestoreStandardListColumns(); #ifdef __WXMAC__ void OnKeyPressed(wxKeyEvent &event); diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index ebf6d33a12..b1a9bae122 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -315,26 +315,6 @@ bool CBOINCBaseView::OnSaveState(wxConfigBase* pConfig) { if (!m_pListPane->OnSaveState(pConfig)) { bReturnValue = false; } - - // Save Column Order -#ifdef wxHAS_LISTCTRL_COLUMN_ORDER - wxString strColumnOrder; - wxString strBuffer; - wxArrayInt aOrder(m_pListPane->GetColumnCount()); - - aOrder = m_pListPane->GetColumnsOrder(); - - strColumnOrder.Printf(wxT("%s"), m_aStdColNameOrder->Item(aOrder[0])); - - for (int i = 1; i < aOrder.Count(); ++i) - { - strBuffer.Printf(wxT(";%s"), m_aStdColNameOrder->Item(aOrder[i])); - strColumnOrder += strBuffer; - } - - pConfig->Write(wxT("ColumnOrder"), strColumnOrder); -#endif - return bReturnValue; } @@ -351,16 +331,6 @@ bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) { if (!m_pListPane->OnRestoreState(pConfig)) { return false; } - - // Restore Column Order -#ifdef wxHAS_LISTCTRL_COLUMN_ORDER - wxString strColumnOrder; - - if (pConfig->Read(wxT("ColumnOrder"), &strColumnOrder)) { - SetListColumnOrder(strColumnOrder, ";"); - } -#endif - return true; } @@ -812,46 +782,6 @@ void CBOINCBaseView::RefreshTaskPane() { } -void CBOINCBaseView::TokenizedStringToArray(wxString tokenized, char * delimiters, wxArrayString* array) { - wxString name; - - array->Clear(); - wxStringTokenizer tok(tokenized, delimiters); - while (tok.HasMoreTokens()) - { - name = tok.GetNextToken(); - if (name.IsEmpty()) continue; - array->Add(name); - } -} - - -void CBOINCBaseView::SetListColumnOrder(wxString tokenized, char * delimiters) { -#ifdef wxHAS_LISTCTRL_COLUMN_ORDER - wxArrayString orderArray; - int i, j, stdCount, orderCount; - int colCount = m_pListPane->GetColumnCount(); - wxArrayInt aOrder(colCount); - - TokenizedStringToArray(tokenized, delimiters, &orderArray); - stdCount = m_aStdColNameOrder->GetCount(); - wxASSERT(stdCount == colCount); - - orderCount = orderArray.GetCount(); - wxASSERT(orderCount == colCount); // Temporary until selective hiding implemented - - for (i=0; iItem(j))) { - aOrder[i] = j; - } - } - } - m_pListPane->SetColumnsOrder(aOrder); -#endif -} - - #ifdef __WXMAC__ // Fix Keyboard navigation on Mac // diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index d8377936b4..9bfe711515 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -125,11 +125,9 @@ public: void ClearSelections(); void RefreshTaskPane(); - void TokenizedStringToArray(wxString tokenized, char * delimiters, wxArrayString* array); - void SetListColumnOrder(wxString tokenized, char * delimiters); - -#ifdef __WXMAC__ CBOINCListCtrl* GetListCtrl() { return m_pListPane; } + +#ifdef __WXMAC__ void OnKeyPressed(wxKeyEvent &event); #endif diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp index 1e61bf42c6..0989f3b8b8 100644 --- a/clientgui/BOINCListCtrl.cpp +++ b/clientgui/BOINCListCtrl.cpp @@ -95,10 +95,8 @@ bool CBOINCListCtrl::OnSaveState(wxConfigBase* pConfig) { wxInt32 iIndex = 0; wxInt32 iColumnCount = 0; - wxASSERT(pConfig); - // Retrieve the base location to store configuration information // Should be in the following form: "/Projects/" strBaseConfigLocation = pConfig->GetPath() + wxT("/"); @@ -131,6 +129,28 @@ bool CBOINCListCtrl::OnSaveState(wxConfigBase* pConfig) { pConfig->Write(wxT("SortColumn"), m_pParentView->m_iSortColumn); pConfig->Write(wxT("ReverseSortOrder"), m_pParentView->m_bReverseSort); + // Save Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + wxString strBuffer; + wxArrayInt aOrder(GetColumnCount()); + CBOINCBaseView* pView = (CBOINCBaseView*)GetParent(); + wxASSERT(wxDynamicCast(pView, CBOINCBaseView)); + + + aOrder = GetColumnsOrder(); + + strColumnOrder.Printf(wxT("%s"), pView->m_aStdColNameOrder->Item(aOrder[0])); + + for (int i = 1; i < aOrder.Count(); ++i) + { + strBuffer.Printf(wxT(";%s"), pView->m_aStdColNameOrder->Item(aOrder[i])); + strColumnOrder += strBuffer; + } + + pConfig->Write(wxT("ColumnOrder"), strColumnOrder); +#endif + return true; } @@ -192,10 +212,76 @@ bool CBOINCListCtrl::OnRestoreState(wxConfigBase* pConfig) { m_pParentView->InitSort(); } + // Restore Column Order +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxString strColumnOrder; + + if (pConfig->Read(wxT("ColumnOrder"), &strColumnOrder)) { + SetListColumnOrder(strColumnOrder, ";"); + } +#endif + return true; } +void CBOINCListCtrl::TokenizedStringToArray(wxString tokenized, char * delimiters, wxArrayString* array) { + wxString name; + + array->Clear(); + wxStringTokenizer tok(tokenized, delimiters); + while (tok.HasMoreTokens()) + { + name = tok.GetNextToken(); + if (name.IsEmpty()) continue; + array->Add(name); + } +} + + +void CBOINCListCtrl::SetListColumnOrder(wxString tokenized, char * delimiters) { +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + wxArrayString orderArray; + int i, j, stdCount, orderCount; + int colCount = GetColumnCount(); + wxArrayInt aOrder(colCount); + + CBOINCBaseView* pView = (CBOINCBaseView*)GetParent(); + wxASSERT(wxDynamicCast(pView, CBOINCBaseView)); + + TokenizedStringToArray(tokenized, delimiters, &orderArray); + stdCount = pView->m_aStdColNameOrder->GetCount(); + wxASSERT(stdCount == colCount); + + orderCount = orderArray.GetCount(); + wxASSERT(orderCount == colCount); // Temporary until selective hiding implemented + + for (i=0; im_aStdColNameOrder->Item(j))) { + aOrder[i] = j; + } + } + } + SetColumnsOrder(aOrder); +#endif +} + + +void CBOINCListCtrl::SetStandardColumnOrder() { +#ifdef wxHAS_LISTCTRL_COLUMN_ORDER + int i; + int colCount = GetColumnCount(); + wxArrayInt aOrder(colCount); + + for (i=0; iUpdateControls(); m_aStdColNameOrder = new wxArrayString; - TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + m_pListPane->TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 150); diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index c578f416cb..3717c42b5f 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -188,7 +188,7 @@ CViewTransfers::CViewTransfers(wxNotebook* pNotebook) : m_pTaskPane->UpdateControls(); m_aStdColNameOrder = new wxArrayString; - TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + m_pListPane->TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125); diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 26eb9a99df..a87269a5f4 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -238,7 +238,7 @@ CViewWork::CViewWork(wxNotebook* pNotebook) : m_pTaskPane->UpdateControls(); m_aStdColNameOrder = new wxArrayString; - TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); + m_pListPane->TokenizedStringToArray(default_column_names, ";", m_aStdColNameOrder); // Create List Pane Items m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125); @@ -567,25 +567,6 @@ bool CViewWork::OnSaveState(wxConfigBase* pConfig) { pConfig->SetPath(strBaseConfigLocation); pConfig->Write(wxT("ActiveTasksOnly"), (pDoc->m_ActiveTasksOnly ? 1 : 0)); - // Save Column Order -#ifdef wxHAS_LISTCTRL_COLUMN_ORDER - wxString strColumnOrder; - wxString strBuffer; - wxArrayInt aOrder(m_pListPane->GetColumnCount()); - - aOrder = m_pListPane->GetColumnsOrder(); - - strColumnOrder.Printf(wxT("%s"), m_aStdColNameOrder->Item(aOrder[0])); - - for (int i = 1; i < aOrder.Count(); ++i) - { - strBuffer.Printf(wxT(";%s"), m_aStdColNameOrder->Item(aOrder[i])); - strColumnOrder += strBuffer; - } - - pConfig->Write(wxT("ColumnOrder"), strColumnOrder); -#endif - return bReturnValue; } @@ -613,15 +594,6 @@ bool CViewWork::OnRestoreState(wxConfigBase* pConfig) { pConfig->Read(wxT("ActiveTasksOnly"), &iTempValue, 0); pDoc->m_ActiveTasksOnly = (iTempValue != 0); - // Restore Column Order -#ifdef wxHAS_LISTCTRL_COLUMN_ORDER - wxString strColumnOrder; - - if (pConfig->Read(wxT("ColumnOrder"), &strColumnOrder)) { - SetListColumnOrder(strColumnOrder, ";"); - } -#endif - return true; } From f1b8c697be0738a6921a2d7902e28bb54c6329d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Fri, 5 Dec 2014 15:49:59 +0200 Subject: [PATCH 5/6] web: remove redundant param in remote job submission handler --- html/user/submit_rpc_handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php index 8582bdd778..302a1d3786 100644 --- a/html/user/submit_rpc_handler.php +++ b/html/user/submit_rpc_handler.php @@ -202,7 +202,7 @@ function submit_jobs( $x .= "\n"; } - $cmd = "cd ../..; ./bin/create_work --appname $app->name --batch $batch_id --rsc_fpops_est $job->rsc_fpops_est --priority $priority --stdin"; + $cmd = "cd ../..; ./bin/create_work --appname $app->name --batch $batch_id --rsc_fpops_est $job->rsc_fpops_est --priority $priority"; if ($result_template_file) { $cmd .= " --result_template templates/$result_template_file"; } From f2a7c28fc0556e9dc8811eb2e1db5570e47cc85f Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 8 Dec 2014 11:56:33 -0500 Subject: [PATCH 6/6] VBOX: Fix crash if DVD-ROM media had been ejected by some external event. Technically this shouldn't be happening, but something funky is going on with VirtualBox and we need to handle things that may cause a crash when cleaning up the VM. --- samples/vboxwrapper/vbox_mscom_impl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/vboxwrapper/vbox_mscom_impl.cpp b/samples/vboxwrapper/vbox_mscom_impl.cpp index d977263161..9c6be6b0db 100644 --- a/samples/vboxwrapper/vbox_mscom_impl.cpp +++ b/samples/vboxwrapper/vbox_mscom_impl.cpp @@ -1144,7 +1144,11 @@ int VBOX_VM::deregister_vm(bool delete_media) { pMediumAttachment->get_Port(&lPort); pMediumAttachment->get_Medium(&pMedium); - mediums.push_back(CComPtr(pMedium)); + // If the device in question is a DVD/CD-ROM drive, the medium may have been ejected. + // If so, pMedium will be NULL. + if (pMedium) { + mediums.push_back(CComPtr(pMedium)); + } rc = pMachine->DetachDevice(strController, lPort, lDevice); CHECK_ERROR(rc);