[Rt-commit] r10689 - in rt/branches/3.999-DANGEROUS: . html/Admin/Elements html/Admin/Users html/Elements html/Ticket/Elements html/Widgets lib/RT/Crypt lib/RT/Interface lib/RT/Interface/Email/Auth t/mail
jesse at bestpractical.com
jesse at bestpractical.com
Sun Feb 3 15:08:28 EST 2008
Author: jesse
Date: Sun Feb 3 15:08:27 2008
New Revision: 10689
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/html/Admin/Elements/ShowKeyInfo
rt/branches/3.999-DANGEROUS/html/Admin/Users/GnuPG.html
rt/branches/3.999-DANGEROUS/html/Elements/Menu
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus
rt/branches/3.999-DANGEROUS/html/Widgets/TitleBoxStart
rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email/Auth/GnuPG.pm
rt/branches/3.999-DANGEROUS/t/mail/gnupg-realmail.t
rt/branches/3.999-DANGEROUS/t/mail/gnupg-reverification.t
rt/branches/3.999-DANGEROUS/t/web/query_builder.t
Log:
r76134 at pinglin: jesse | 2008-02-03 14:29:46 -0500
gnupg-relamail PASS
r76135 at pinglin: jesse | 2008-02-03 14:42:33 -0500
* gnupg-reverification passes
r76136 at pinglin: jesse | 2008-02-03 15:07:28 -0500
* Now failing 18 test scripts
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/ShowKeyInfo
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/ShowKeyInfo (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/ShowKeyInfo Sun Feb 3 15:08:27 2008
@@ -82,10 +82,10 @@
my %res = RT::Crypt::GnuPG::get_key_info( $email, $Type );
my $title;
-unless ( $Type eq 'private' ) {
- $title = _('GnuPG public key(s) for %1', $email);
-} else {
+if ( $Type eq 'private' ) {
$title = _('GnuPG private key(s) for %1', $email);
+} else {
+ $title = _('GnuPG public key(s) for %1', $email);
}
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Users/GnuPG.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Users/GnuPG.html (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Users/GnuPG.html Sun Feb 3 15:08:27 2008
@@ -20,7 +20,7 @@
<& /Widgets/Form/Select,
name => 'private_key',
description => _('Private Key'),
- values => [ map $_->{'Key'}, @{ $keys_meta{'info'} } ],
+ values => [ map $_->{'key'}, @{ $keys_meta{'info'} } ],
current_value => $user_object->private_key,
DefaultLabel => _('No private key'),
&>
Modified: rt/branches/3.999-DANGEROUS/html/Elements/Menu
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/Menu (original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/Menu Sun Feb 3 15:08:27 2008
@@ -47,66 +47,59 @@
%# END BPS TAGGED BLOCK }}}
<ul<% !$level ? ' id="system-menu"' : ''|n %><% $menu_class ? qq[ class="$menu_class"] : ''|n %>>
<div<% $menu_class ? qq[ class="$menu_class"] : ''|n %>><div class="wrapper">
-% my $sep = 0;
-% my $postsep = 0;
-% my $accesskey = 1;
-%
-% $count = 0;
-% $class = {};
-%
-% foreach $tab (sort keys %{$toptabs}) {
-% $count++;
-%
-% my $current = $current_toptab || '';
-% my $path = $toptabs->{$tab}->{'path'} || "";
-%
-% $path =~ s#/index.html$##gi;
-% $current =~ s#/index.html$##gi;
-%
-% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
-%
-% my @aclass;
-% push @aclass, 'selected'
-% if $path eq $current;
-%
-% push @aclass, 'odd'
-% if $level % 2;
-%
-% $class->{a} = join ' ', @aclass;
-%
-% my @li;
-% push @li, 'first'
-% if $count == 1;
-%
-% push @li, 'pre-separator'
-% if $sep;
-%
-% push @li, 'post-separator'
-% if $postsep;
-%
-% $class->{li} = join ' ', @li;
-%
-% my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^https?:/i
-% ? $toptabs->{$tab}->{'path'} || ''
-% : RT->config->get('WebPath') . "/" . $toptabs->{$tab}->{'path'};
-%
- <li<% $class->{'li'} ? qq[ class="$class->{li}"] : ''|n %> >
- <% $count > 1 && !$postsep && qq[<span class="bullet">· </span>]|n%>
- <a href="<% $url %>"
- <% $class->{a} && qq[ class="$class->{a}"] |n %>
- <% !$level && " accesskey='".$accesskey++."'" |n %>>
- <% $toptabs->{$tab}->{'title'}%></a>
+<%perl>
+ my $sep = 0;
+ my $postsep = 0;
+ my $accesskey = 1;
+
+ $count = 0;
+ $class = {};
+
+ foreach $tab (sort keys %{$toptabs}) {
+ $count++;
+
+ my $current = $current_toptab || '';
+ my $path = $toptabs->{$tab}->{'path'} || "";
+
+ $path =~ s#/index.html$##gi;
+ $current =~ s#/index.html$##gi;
+
+ $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
+
+ my @aclass;
+ push @aclass, 'selected'
+ if $path eq $current;
+
+ push @aclass, 'odd'
+ if $level % 2;
+
+ $class->{a} = join ' ', @aclass;
+
+ my @li;
+ push @li, 'first'
+ if $count == 1;
+
+ push @li, 'pre-separator'
+ if $sep;
+
+ push @li, 'post-separator'
+ if $postsep;
+
+ $class->{li} = join ' ', @li;
+ my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^https?:/i
+ ? $toptabs->{$tab}->{'path'} || ''
+ : RT->config->get('WebPath') . "/" . $toptabs->{$tab}->{'path'};
+</%perl>
+<li<% $class->{'li'} ? qq[ class="$class->{li}"] : ''|n %> ><a href="<% $url %>" <% $class->{a} && qq[ class="$class->{a}"] |n %> <% !$level && " accesskey='".$accesskey++."'" |n %>> <% $toptabs->{$tab}->{'title'}%></a>
%# Second-level items
-% if ($toptabs->{$tab}->{'subtabs'}
-% and keys %{$toptabs->{$tab}->{'subtabs'}})
-% {
+% if ($toptabs->{$tab}->{'subtabs'} and keys %{$toptabs->{$tab}->{'subtabs'}}) {
<& /Elements/Menu, level => $level+1,
current_toptab => $toptabs->{$tab}->{'current_subtab'},
toptabs => $toptabs->{$tab}->{'subtabs'},
last_level => $toptabs->{$tab}->{last_system_menu_level} &>
% }
- </li>
+</li>
% if ($sep) {
<li class="separator">···</li>
% }
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus Sun Feb 3 15:08:27 2008
@@ -56,7 +56,7 @@
<%ARGS>
$Attachment
$WarnUnsigned => undef
-$Reverify => 1
+$reverify => 1
</%ARGS>
<%INIT>
my @runs;
@@ -132,22 +132,22 @@
foreach my $run ( @runs ) {
foreach my $line ( @$run ) {
if ( $line->{'operation'} eq 'key_check' ) {
- next unless $Reverify;
+ next unless $reverify;
# if a public key was missing during verification then we want try again
next unless $line->{'key_type'} eq 'public' && $line->{'status'} eq 'MISSING';
# but only if we have key
- my %key = RT::Crypt::GnuPG::get_public_key_info( $line->{'Key'} );
+ my %key = RT::Crypt::GnuPG::get_public_key_info( $line->{'key'} );
if ( $key{'info'} ) {
my ($status, $msg) = $reverify_cb->($Attachment);
unless ($status) {
Jifty->log->error($msg);
} else {
- return $m->comp('SELF', %ARGS, Reverify => 0);
+ return $m->comp('SELF', %ARGS, reverify => 0);
}
}
else {
- push @messages, _( "Public key '0x%1' is required to verify signature", $line->{'Key'} );
+ push @messages, _( "Public key '0x%1' is required to verify signature", $line->{'key'} );
}
}
elsif ( $line->{'operation'} eq 'passphrase_check' ) {
Modified: rt/branches/3.999-DANGEROUS/html/Widgets/TitleBoxStart
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Widgets/TitleBoxStart (original)
+++ rt/branches/3.999-DANGEROUS/html/Widgets/TitleBoxStart Sun Feb 3 15:08:27 2008
@@ -47,7 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<div class="titlebox <% $class %>" id="<% $id %>">
<div class="titlebox-title<% $title_class && " $title_class" %>">
-% if ($hideable) {
+% if (0) { #$hideable) {
<span class="widget"><a href="#" onclick="return rollup('<%$tid%>');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
% }
<span class="left"><% $title_href && qq[<a href="$title_href">] | n %><% $title %><% $title_raw |n %><% $title_href && "</a>" |n%></span>
@@ -75,13 +75,12 @@
#
my $page = $m->request_comp->path;
-my $tid = "TitleBox--$page--" .
- join '--', ($class, $bodyclass, $title, $id);
+my $tid ='';# "TitleBox--$page--" . join '--', ($class, $bodyclass, $title, $id);
-$tid =~ s{[/\s]+}{_}g;
+#$tid =~ s{[/\s]+}{_}g;
-my $i = 0;
-$i++ while $m->notes("$tid-$i");
-$m->notes("$tid-$i" => 1);
-$tid = "$tid-$i";
+#my $i = 0;
+#$i++ while $m->notes("$tid-$i");
+#$m->notes("$tid-$i" => 1);
+#$tid = "$tid-$i";
</%init>
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Crypt/GnuPG.pm Sun Feb 3 15:08:27 2008
@@ -1622,7 +1622,7 @@
my ( $keyword, $args ) = ( $line =~ /^(\S+)\s*(.*)$/s );
if ( $simple_keyword{$keyword} ) {
push @res, $simple_keyword{$keyword};
- $res[-1]->{'Keyword'} = $keyword;
+ $res[-1]->{'keyword'} = $keyword;
next;
}
unless ( $parse_keyword{$keyword} ) {
@@ -1649,7 +1649,7 @@
my %res = (
operation => 'passphrase_check',
status => $keyword eq 'BAD_PASSPHRASE' ? 'BAD' : 'DONE',
- Key => $key_id,
+ key => $key_id,
);
$res{'status'} = 'MISSING'
if $status[ $i - 1 ] =~ /^MISSING_PASSPHRASE/;
@@ -1658,7 +1658,7 @@
unless $line
=~ /^NEED_PASSPHRASE\s+(\S+)\s+(\S+)\s+(\S+)/;
next if $key_id && $2 ne $key_id;
- @res{ 'main_key', 'Key', 'key_type' } = ( $1, $2, $3 );
+ @res{ 'main_key', 'key', 'key_type' } = ( $1, $2, $3 );
last;
}
$res{'message'}
@@ -1681,14 +1681,14 @@
);
foreach my $line ( reverse @status[ 0 .. $i - 1 ] ) {
next unless $line =~ /^BEGIN_ENCRYPTION\s+(\S+)\s+(\S+)/;
- @res{ 'MdcMethod', 'Symalgo' } = ( $1, $2 );
+ @res{ 'mdc_method', 'sym_algo' } = ( $1, $2 );
last;
}
push @res, \%res;
} elsif ( $keyword eq 'DECRYPTION_FAILED'
|| $keyword eq 'DECRYPTION_OKAY' )
{
- my %res = ( operation => 'Decrypt' );
+ my %res = ( operation => 'decrypt' );
@res{ 'status', 'message' }
= $keyword eq 'DECRYPTION_FAILED'
? ( 'ERROR', 'Decryption failed' )
@@ -1732,8 +1732,8 @@
status => 'DONE',
message => 'The signature is good',
);
- @res{qw(key userstring)} = split /\s+/, $args, 2;
- $res{'message'} .= ', signed by ' . $res{'userstring'};
+ @res{qw(key user_string)} = split /\s+/, $args, 2;
+ $res{'message'} .= ', signed by ' . $res{'user_string'};
foreach my $line ( @status[ $i .. $#status ] ) {
next unless $line =~ /^TRUST_(\S+)/;
@@ -1756,7 +1756,7 @@
rubkey_algo
hash_algo
class
- PKFingerprint
+ pk_fingerprint
other
)
}
@@ -1770,7 +1770,7 @@
status => 'BAD',
message => 'The signature has not been verified okay',
);
- @res{qw(Key userstring)} = split /\s+/, $args, 2;
+ @res{qw(key user_string)} = split /\s+/, $args, 2;
push @res, \%res;
} elsif ( $keyword eq 'ERRSIG' ) {
my %res = (
@@ -1778,7 +1778,7 @@
status => 'ERROR',
message => 'Not possible to check the signature',
);
- @res{qw(Key Pubkeyalgo Hashalgo class Timestamp reason_code Other)}
+ @res{qw(key pubkey_algo hash_algo class timestamp reason_code Other)}
= split /\s+/, $args, 7;
$res{'reason'}
@@ -1796,8 +1796,8 @@
status => 'DONE',
message => "Signed message",
type => $props[0],
- pub_key_algo => $props[1],
- hash_key_algo => $props[2],
+ pubkey_algo => $props[1],
+ hashkey_algo => $props[2],
class => $props[3],
timestamp => $props[4],
key_fingerprint => $props[5],
@@ -1831,10 +1831,10 @@
reason => $reason,
};
} else {
- Jifty->log->warn("Keyword $keyword is unknown");
+ Jifty->log->warn("keyword $keyword is unknown");
next;
}
- $res[-1]{'Keyword'} = $keyword if @res && !$res[-1]{'Keyword'};
+ $res[-1]{'keyword'} = $keyword if @res && !$res[-1]{'keyword'};
}
return @res;
}
@@ -1976,8 +1976,8 @@
$status = 0;
my %issue = (
email => $address,
- $user ? ( User => $user ) : (),
- Keys => undef,
+ $user ? ( user => $user ) : (),
+ keys => undef,
);
$issue{'message'}
= "Selected key either is not trusted or doesn't exist anymore."
@@ -1995,8 +1995,8 @@
$status = 0;
my %issue = (
email => $address,
- $user ? ( User => $user ) : (),
- Keys => undef,
+ $user ? ( user => $user ) : (),
+ keys => undef,
);
unless ( $res{'info'} && @{ $res{'info'} } ) {
@@ -2119,7 +2119,7 @@
my %info;
@info{
qw(
- trust_char key_length algorithm Key
+ trust_char key_length algorithm key
created expire empty owner_trust_char
empty empty capabilities Other
)
@@ -2150,9 +2150,9 @@
my %info;
@info{
qw(
- empty key_length algorithm Key
+ empty key_length algorithm key
created expire empty owner_trust_char
- empty empty capabilities Other
+ empty empty capabilities other
)
}
= split /:/, $line, 12;
@@ -2165,7 +2165,7 @@
@info{qw(trust created expire string)}
= ( split /:/, $line )[ 0, 4, 5, 8 ];
$info{$_} = _parse_date( $info{$_} ) foreach qw(created expire);
- push @{ $res[-1]{'User'} ||= [] }, \%info;
+ push @{ $res[-1]{'user'} ||= [] }, \%info;
} elsif ( $tag eq 'fpr' ) {
$res[-1]{'fingerprint'} = ( split /:/, $line, 10 )[8];
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm Sun Feb 3 15:08:27 2008
@@ -1199,7 +1199,7 @@
*{ $class . "::get_current_user" }{CODE};
};
my ( $status, $msg ) = $Code->(
- Message => $Message,
+ message => $Message,
raw_message_ref => \$args{'message'},
);
next if $status > 0;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email/Auth/GnuPG.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email/Auth/GnuPG.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email/Auth/GnuPG.pm Sun Feb 3 15:08:27 2008
@@ -75,7 +75,7 @@
);
$args{'message'}->head->delete($_)
- for qw(X-RT-GnuPG-status X-RT-Incoming-Encrypton
+ for qw(X-RT-GnuPG-status X-RT-Incoming-Encryption
X-RT-Incoming-Signature X-RT-Privacy);
my $msg = $args{'message'}->dup;
@@ -197,7 +197,7 @@
)
)[0];
my ($status) = RT::Interface::Email::send_email_using_template(
- To => $address,
+ to => $address,
template => 'Error: no private key',
arguments => {
message => $args{'message'},
Modified: rt/branches/3.999-DANGEROUS/t/mail/gnupg-realmail.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/mail/gnupg-realmail.t (original)
+++ rt/branches/3.999-DANGEROUS/t/mail/gnupg-realmail.t Sun Feb 3 15:08:27 2008
@@ -100,8 +100,9 @@
if ($usage =~ /encrypted/) {
is( $msg->get_header('X-RT-Incoming-Encryption'),
'Success',
- "$eid: recorded incoming mail that is encrypted"
+ "$eid: recorded incoming mail that is encrypted"
);
+
is( $msg->get_header('X-RT-Privacy'),
'PGP',
"$eid: recorded incoming mail that is encrypted"
@@ -124,7 +125,7 @@
if ($usage =~ /signed/) {
is( $msg->get_header('X-RT-Incoming-Signature'),
'RT Test <rt-test at example.com>',
- "$eid: recorded incoming mail that is signed"
+ "$eid: recorded incoming mail that is signed - $usage"
);
}
else {
Modified: rt/branches/3.999-DANGEROUS/t/mail/gnupg-reverification.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/mail/gnupg-reverification.t (original)
+++ rt/branches/3.999-DANGEROUS/t/mail/gnupg-reverification.t Sun Feb 3 15:08:27 2008
@@ -82,5 +82,6 @@
qr/The signature is good/is,
"signature is re-verified and now good",
);
+
}
Modified: rt/branches/3.999-DANGEROUS/t/web/query_builder.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/query_builder.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/query_builder.t Sun Feb 3 15:08:27 2008
@@ -137,7 +137,7 @@
ok $agent->form_name('BuildQuery'), "found the form again";
is_deeply selected_clauses, ["2"], 'the one we added is only selected';
is get_query_from_form,
- "( id > 1234 AND Status = 'stalled' ) OR queue != 'Regression'",
+ "( id > 1234 AND status = 'stalled' ) OR queue != 'Regression'",
"added new one";
}
More information about the Rt-commit
mailing list