aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Panel/Interface.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Panel/Interface.pm')
-rw-r--r--lib/Fripost/Panel/Interface.pm19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm
index db6752e..f150a39 100644
--- a/lib/Fripost/Panel/Interface.pm
+++ b/lib/Fripost/Panel/Interface.pm
@@ -12,10 +12,12 @@ Interface.pm -
=cut
use parent 'Fripost::Panel::Login';
+
use Fripost::Schema;
use Fripost::Password;
use HTML::Entities;
-use Net::IDN::Encode qw/email_to_unicode/;
+use Net::IDN::Encode qw/email_to_unicode domain_to_ascii/;
+use CGI::Util qw/escape unescape/;
# This method is called right before the 'setup' method below. It
@@ -117,7 +119,9 @@ sub ListLocals : Runmode {
$template->param( listAliases => $#aliases >= 0 ||
$domain{permissions} =~ /[aop]/ );
$template->param( aliases => [
- map { { alias => encode_entities($_->{alias})
+ map { my $a = escape(encode_entities($_->{alias})); # TODO
+ { aliasurl => escape($a)
+ , alias => $a
, description => join ("\n", @{$_->{description}})
, isactive => $_->{isactive}
, destinations => [ map { {destination => encode_entities($_)} }
@@ -139,7 +143,7 @@ sub ListLocals : Runmode {
, description => join ("\n", @{$_->{description}})
, isactive => $_->{isactive}
, transport => $_->{transport}
- , listurl => $CFG{'listurl_'.$_->{transport}}.$_->{list}.'@'.$d
+ , listurl => $CFG{'listurl_'.$_->{transport}}.$_->{list}.'@'.domain_to_ascii($d)
};
}
@lists
@@ -189,7 +193,7 @@ sub EditDomain : Runmode {
$template->param( isactive => $q->param('isactive')
, description => $q->param('description')
, catchalls => $q->param('catchalls')
- , error => encode_entities ($error, "‘‘") );
+ , error => encode_entities ($error) );
}
else {
$template->param( isactive => $domain{isactive}
@@ -267,8 +271,7 @@ sub EditLocal : Runmode {
$q->param('oldpw'),
ldap_uri => $CFG{ldap_uri},
ldap_suffix => $CFG{ldap_suffix},
- -die => "Wrong password (for ‘"
- .encode_entities($u)."‘)." );
+ -die => "Wrong password (for ‘".$u."’)." );
};
$error = $@ || $fp->mailbox->passwd(
$entry{user},
@@ -336,7 +339,7 @@ sub EditLocal : Runmode {
my $news = (defined $q->param('submit') or
(defined $q->param('a') and $q->param('a') eq 'delete'));
$template->param( newChanges => $news );
- $template->param( error => encode_entities ($error, "‘‘") ) if $error;
+ $template->param( error => encode_entities ($error) ) if $error;
$template->param( canDelete => 1 ) if $t eq 'alias'; # TODO
$template->param( listurl => $CFG{'listurl_'.$local{transport}}.$l.'@'.$d )
if $t eq 'list';
@@ -445,7 +448,7 @@ sub AddLocal : Runmode {
}
$template->param( isactive => $q->param('isactive')
, description => $q->param('description')
- , error => encode_entities ($error, "‘‘") );
+ , error => encode_entities ($error) );
}
else {
$template->param( isactive => 1 );