diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 587b44d5c..0b2e9cb5e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -9,6 +9,11 @@ - fix [ 1381309 ] FormParam macro returns always undef - fix [ 1379595 ] http proxy broken - fix [ 1379060 ] Unable to view subscription codes + - fix [ 1379407 ] All collaboration systems show up as same username + - Fixed a syntax error in Post.pm + - fix [ 1382675 ] File Path Wrong - Uploads are difficult + - fix [ 1380368 ] Snippets should not contain debugging info + - fix [ 1377668 ] Unescaped double quote in Syndacate title cause problems 6.8.2 diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 4118b7469..10306a1a5 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -104,7 +104,7 @@ sub contentHandler { WebGUI::HTTP::setStatus("403","We don't allow prefetch, because it increases bandwidth, hurts stats, and can break web sites."); $r->print(WebGUI::HTTP::getHeader()); } elsif ($session{setting}{specialState} eq "upgrading") { - $r->print(upgrading()); + upgrading($r); } elsif ($session{setting}{specialState} eq "init") { $r->print(setup()); } else { @@ -117,16 +117,9 @@ sub contentHandler { } else { $output = page(); } + $r->print(WebGUI::HTTP::getHeader()); + $r->print($output) unless (WebGUI::HTTP::isRedirect()); WebGUI::Affiliate::grabReferral(); # process affilliate tracking request - if (WebGUI::HTTP::isRedirect()) { - $output = WebGUI::HTTP::getHeader(); - } else { - $output = WebGUI::HTTP::getHeader().$output; - if (WebGUI::ErrorHandler::canShowDebug()) { - $output .= WebGUI::ErrorHandler::showDebug(); - } - } - $r->print($output); } WebGUI::Session::close(); return Apache2::Const::OK; @@ -261,13 +254,13 @@ sub uploadsHandler { #------------------------------------------------------------------- sub upgrading { - my $output = WebGUI::HTTP::getHeader(); + my $r = shift; + $r->print(WebGUI::HTTP::getHeader()); open(FILE,"<".$session{config}{webguiRoot}."/docs/maintenance.html"); while () { - $output .= $_; + $r->print($_); } close(FILE); - return $output; } diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 78d2bf666..c5c629cdf 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -793,7 +793,7 @@ Sets the status of this post to denied. sub setStatusDenied { my ($self) = @_; $self->update({status=>'denied'}); - WebGUI::MessageLog::addInternationalizedEntry($self->get("ownerUserId"),'',WebGUI::URL::getSiteUrl().'/'.$self->getUrl,580); + WebGUI::MessageLog::addInternationalizedEntry($self->get("ownerUserId"),'',WebGUI::URL::getSiteURL().'/'.$self->getUrl,580); } #------------------------------------------------------------------- @@ -811,7 +811,7 @@ sub setStatusPending { } else { $self->update({status=>'pending'}); WebGUI::MessageLog::addInternationalizedEntry('',$self->getThread->getParent->get("moderateGroupId"), - WebGUI::URL::getSiteUrl().'/'.$self->getUrl("revision=".$self->get("revisionDate")),578,'WebGUI','pending'); + WebGUI::URL::getSiteURL().'/'.$self->getUrl("revision=".$self->get("revisionDate")),578,'WebGUI','pending'); } } diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index 7e2b3400e..cc91eba19 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -532,6 +532,8 @@ sub view { sub _constructRSSHeadTitleLink{ my($var,$rssTitle)=@_; my $rssFeedSuffix=WebGUI::International::get('RSS Feed Title Suffix','Asset_SyndicatedContent'); + my $title = ($rssTitle) ? ($rssTitle." ".$rssFeedSuffix) : $rssFeedSuffix; + $title =~ s/\"/"/g; WebGUI::Style::setLink($var->{'rss.url'}, { rel=> 'alternate', type=> 'application/rss+xml', diff --git a/lib/WebGUI/Storage.pm b/lib/WebGUI/Storage.pm index 2fd73774e..6a2cdee0a 100644 --- a/lib/WebGUI/Storage.pm +++ b/lib/WebGUI/Storage.pm @@ -203,8 +203,12 @@ sub addFileFromFormPost { my $attachmentCount = 1; foreach my $upload ($session{req}->upload($formVariableName)) { return $filename if $attachmentCount > $attachmentLimit; - my $tempPath = $upload->tempname(); - $filename = $upload->filename(); + my $tempPath = $upload->filename(); + if ($tempPath =~ /([^\/\\]+)$/) { + $filename = $1; + } else { + $filename = $tempPath; + } next unless $filename; my $type = $self->getFileExtension($filename); if (isIn($type, qw(pl perl sh cgi php asp))) { # make us safe from malicious uploads diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index cd17e5e00..49ec3bb45 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -158,6 +158,9 @@ if (WebGUI::Grouping::isInGroup(2)) { my $macroHeadTags = generateAdditionalHeadTags(); WebGUI::Macro::process(\$macroHeadTags); $output =~ s/\<\!-- macro head tags --\>/$macroHeadTags/; + if (WebGUI::ErrorHandler::canShowDebug()) { + $output .= WebGUI::ErrorHandler::showDebug(); + } return $output; }