From 797b1d2cc6be3378e9fc8f9393e5e1aadccc9cf9 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 7 Mar 2008 16:35:12 +0000 Subject: [PATCH] fixed: exporting as HTML leaks sessions for inaccessible assets --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/AssetExportHtml.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 850561989..2d22783cb 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,6 @@ 7.5.6 - Internationalized Calendar templates + - fixed: exporting as HTML leaks sessions for inaccessible assets, 7.5.5 - fixed: Several typos in the new Calendar help documentation. diff --git a/lib/WebGUI/AssetExportHtml.pm b/lib/WebGUI/AssetExportHtml.pm index 2343441a9..5893d978f 100644 --- a/lib/WebGUI/AssetExportHtml.pm +++ b/lib/WebGUI/AssetExportHtml.pm @@ -119,6 +119,8 @@ sub _exportAsHtml { # notify we can't output because user selected can't view the page unless ($asset->canView($userId)) { $self->session->output->print(sprintf($i18n->get('bad user privileges')."\n") . $asset->getUrl) unless $quiet; + $assetSession->var->end; + $assetSession->close; next; } @@ -139,6 +141,8 @@ sub _exportAsHtml { next if $exportCheck->getUrl eq '/root'; unless ($exportCheck->get('isExportable')) { $self->session->output->print("$pathWithFilename skipped, not exportable
") unless $quiet; + $assetSession->var->end; + $assetSession->close; next ASSET; } }