From 0c12259144ff0dd91377ccb7dd8b26452dd36763 Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Mon, 5 Jun 2006 20:56:29 +0000 Subject: [PATCH] added missing privilege check --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/SQLForm.pm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index f207cab3d..33b911560 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,4 +1,5 @@ 6.99.4 + - fix: SQLForm - added missing privilege check - fix: typo in spectre - fixed a bug where a user could transfer a negative amount of karma to a thread and actually gain karma from the thread. diff --git a/lib/WebGUI/Asset/Wobject/SQLForm.pm b/lib/WebGUI/Asset/Wobject/SQLForm.pm index 713d67052..4c911bac4 100644 --- a/lib/WebGUI/Asset/Wobject/SQLForm.pm +++ b/lib/WebGUI/Asset/Wobject/SQLForm.pm @@ -1430,6 +1430,8 @@ Will mark the 'deleted' field identified by the id given in the form param 'fid' sub www_enableField { my $self = shift; + return $self->session->privilege->insufficient() unless ($self->_canAlterTable); + $self->session->db->write('delete from SQLForm_fieldDefinitions '. ' where property="disabled" and assetId='.$self->session->db->quote($self->getId).' and fieldId='.$self->session->db->quote($self->session->form->process("fid")));