From c5c5f93b76cd129dac697c1121fbe2b59eb7d1c5 Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Thu, 9 Mar 2006 23:05:11 +0000 Subject: [PATCH] fixed two security problems with www_process in DataForm.pm --- lib/WebGUI/Asset/Wobject/DataForm.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index 37a6f2ffa..781ebf296 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -1069,6 +1069,7 @@ sub www_moveTabLeft { #------------------------------------------------------------------- sub www_process { my $self = shift; + return $self->session->privilege->insufficient() unless $self->canView; my $entryId = $self->setCollateral("DataForm_entry","DataForm_entryId",{ DataForm_entryId=>$self->session->form->process("entryId"), assetId=>$self->getId, @@ -1106,7 +1107,7 @@ sub www_process { and DataForm_fieldId=".$self->session->db->quote($row{DataForm_fieldId})); if ($exists) { $self->session->db->write("update DataForm_entryData set value=".$self->session->db->quote($value)." - where DataForm_entryId=".$self->session->db->quote($entryId)." and DataForm_fieldId=".$self->session->db->quote($row{DataForm_fieldId})); + where DataForm_entryId=".$self->session->db->quote($entryId)." and DataForm_fieldId=".$self->session->db->quote($row{DataForm_fieldId})) if $self->canEdit; $updating = 1; } else { $self->session->db->write("insert into DataForm_entryData (DataForm_entryId,DataForm_fieldId,assetId,value) values