- 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
This commit is contained in:
JT Smith 2005-12-16 19:52:07 +00:00
parent a1e85d8b12
commit 1bcfa3bddc
6 changed files with 24 additions and 17 deletions

View file

@ -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

View file

@ -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 (<FILE>) {
$output .= $_;
$r->print($_);
}
close(FILE);
return $output;
}

View file

@ -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');
}
}

View file

@ -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/\"/&quot;/g;
WebGUI::Style::setLink($var->{'rss.url'},
{ rel=> 'alternate',
type=> 'application/rss+xml',

View file

@ -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

View file

@ -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;
}