From 9810b57f40978caa6103aff4006c62dd0fcaeaa1 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 16 Mar 2010 12:07:25 -0700 Subject: [PATCH] Fix double slash removal in FilePump macro. Fixes bug #11478. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Macro/FilePump.pm | 2 +- t/Macro/FilePump.t | 15 ++------------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0ef1cb13d..2c7053f83 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,6 +5,7 @@ - fixed #11475: Inherit permissions on imported package fails if asset already exists. - fixed #11476: Missing override in Page Layout shortcut - fixed: Unable to add threads with permission to edit CS but not in post group + - fixed #11478: Overzealous removal of double slashes in FilePump macro 7.9.0 - added #11383: AJAX username checks at registration (Luke Robinson / Orchard Solutions) diff --git a/lib/WebGUI/Macro/FilePump.pm b/lib/WebGUI/Macro/FilePump.pm index d8312b310..22f69e381 100644 --- a/lib/WebGUI/Macro/FilePump.pm +++ b/lib/WebGUI/Macro/FilePump.pm @@ -150,7 +150,7 @@ sub process { elsif ($scheme eq 'http' or $scheme eq 'https') { $url = $uri->as_string; } - $url =~ tr{/}{/}s; + $url =~ s$(?session; #---------------------------------------------------------------------------- # Tests -my $tests = 11; -plan tests => 1 + $tests; +plan tests => 11; #---------------------------------------------------------------------------- # put your tests here -my $macro = 'WebGUI::Macro::FilePump'; -my $loaded = use_ok($macro); - my $bundle = WebGUI::FilePump::Bundle->create($session, { bundleName => 'test bundle'}); -SKIP: { - -skip "Unable to load $macro", $tests unless $loaded; - my $root = WebGUI::Asset->getRoot($session); my $snippet = $root->addChild({ @@ -120,10 +113,6 @@ is( '... check illegal file type access returns empty string' ); - -} - - #---------------------------------------------------------------------------- # Cleanup END {