Skip to content
Permalink
Browse files

Fix gateway issues in several modules, including auth for password re…

…covery. Fixes bug #12375
  • Loading branch information...
perlDreamer committed Jul 19, 2012
1 parent 6ca603e commit ca2c06381a500adf49c27c42096c4369472b5a21
@@ -26,6 +26,7 @@
- fixed: Http Proxy assets with no URL to proxy cannot be deleted.
- fixed: Friends request messages that no longer exist throw a warning.
- fixed: Asset Report asset can search for all wobjects in addition to all assets.
- fixed #12375: Gateway URL ignored for password recovery

7.10.24
- fixed #12318: asset error causes asset manager to fail
@@ -938,7 +938,7 @@ sub www_inviteUserSave {
##Create the invitation url for each individual invitation
my $inviteId = $session->id->generate();
$var->{'url'}
= $session->url->append( $session->url->getSiteURL, 'op=auth;method=createAccount;code=' . $inviteId );
= $session->url->append( $session->url->getSiteURL . $session->url->gateway, 'op=auth;method=createAccount;code=' . $inviteId );

##Create the invitation record.
my $now = WebGUI::DateTime->new( $session, DateTime->now->set_time_zone('UTC')->epoch )->toMysqlDate;
@@ -1365,7 +1365,7 @@ sub www_sendMessageSave {
fromUsername => $fromUser->username,
subject => $messageProperties->{subject},
message => $messageProperties->{message},
inboxLink => $session->url->append($session->url->getSiteURL, 'op=account;module=inbox'),
inboxLink => $session->url->append($session->url->getSiteURL . $session->url->gateway, 'op=account;module=inbox'),
};
##Fill in template
my $output = $smsNotificationTemplate->process($var);
@@ -1398,7 +1398,7 @@ sub www_sendMessageSave {
fromUsername => $fromUser->username,
subject => $messageProperties->{subject},
message => $messageProperties->{message},
inboxLink => $session->url->append($session->url->getSiteURL, 'op=account;module=inbox'),
inboxLink => $session->url->append($session->url->getSiteURL . $session->url->gateway, 'op=account;module=inbox'),
};
##Fill in template
my $output = $template->process($var);
@@ -1136,7 +1136,7 @@ sub emailRecoverPasswordFinish {

my $mail = WebGUI::Mail::Send->create($session, { to=>$email, subject=>$i18n->get('WebGUI password recovery')});
my $vars = { };
$vars->{recoverPasswordUrl} = $session->url->append($session->url->getSiteURL,'op=auth;method=emailResetPassword;token='.$recoveryGuid);
$vars->{recoverPasswordUrl} = $session->url->append($session->url->getSiteURL.$session->url->gateway,'op=auth;method=emailResetPassword;token='.$recoveryGuid);
my $templateId = $session->setting->get('webguiPasswordRecoveryEmailTemplate');
my $template = WebGUI::Asset->newByDynamicClass($session, $templateId);
if (!$template) {
@@ -355,7 +355,7 @@ sub sendAddRequest {
my $userId = shift;
my $comments = shift;
my $url = $self->session->url;
my $inviteUrl = shift || $url->append($url->getSiteURL,'op=account');
my $inviteUrl = shift || $url->append($url->getSiteURL,$url->gateway('/','op=account'));

my $i18n = WebGUI::International->new($self->session, "Friends");

@@ -368,7 +368,7 @@ sub sendAddRequest {
$inviteUrl = $url->append($inviteUrl,'inviteId='.$inviteId);

# Build the message
my $messageText = sprintf $i18n->get("invitation approval email"), $self->user->getWholeName, $self->session->url->getSiteURL, $comments, $inviteUrl;
my $messageText = sprintf $i18n->get("invitation approval email"), $self->user->getWholeName, $self->session->url->getSiteURL.$url->gateway('/'), $comments, $inviteUrl;

# send message
my $message = WebGUI::Inbox->new($self->session)->addMessage({
@@ -180,7 +180,7 @@ sub addHtml {
my $self = shift;
my $text = shift;
if ($text !~ /<(?:html|body)/) {
my $site = $self->session->url->getSiteURL;
my $site = $self->session->url->getSiteURL.$self->session->url->gateway;
$text = <<END_HTML;
<html>
<head>
@@ -689,7 +689,7 @@ sub www_manageRevisionsInTag {
sprintf $html,
$i18n->get( "error permission www_manageRevisionsInTag title" ),
$i18n->get( "error permission www_manageRevisionsInTag body" ),
$session->url->getSiteURL,
$session->url->getSiteURL . $session->url->gateway,
$i18n->get( "back to site" ),
);
}

0 comments on commit ca2c063

Please sign in to comment.
You can’t perform that action at this time.