[Rt-commit] rt branch, 4.2/use-queue-encryption-defaults-on-create, created. rt-4.1.23-212-g4c35a7c

Kevin Falcone falcone at bestpractical.com
Wed Sep 18 17:16:04 EDT 2013


The branch, 4.2/use-queue-encryption-defaults-on-create has been created
        at  4c35a7c68b1d557f148416dd36f47326faf5d28f (commit)

- Log -----------------------------------------------------------------
commit 4c35a7c68b1d557f148416dd36f47326faf5d28f
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 18 16:59:41 2013 -0400

    Only set X-RT-Encrypt|Sign if we get an argument.
    
    The web ui has a hidden field and a checkbox.  If you check the
    checkbox, we get an arrayref and set X-RT-Encrypt: to 1.  If you don't
    check the checkbox, we get 0 and we set X-RT-Encrypt to 0.
    
    If you modify the UI so that users cannot uncheck Encrypt (and use
    Always Encrypt in your Queue config) this code would set X-RT-Encrypt: 0
    and ignore the Queue default.
    
    It now doesn't set a header, and the mail that is sent out uses
    WillSignEncrypt to look at the Queue and see that it should encrypt.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 88800a6..c5b41ab 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -2032,7 +2032,9 @@ sub CreateTicket {
     }
 
     for my $argument (qw(Encrypt Sign)) {
-        $MIMEObj->head->replace( "X-RT-$argument" => $ARGS{$argument} ? 1 : 0 );
+        if ( defined $ARGS{ $argument } ) {
+            $MIMEObj->head->replace( "X-RT-$argument" => $ARGS{$argument} ? 1 : 0 );
+        }
     }
 
     my %create_args = (

-----------------------------------------------------------------------


More information about the Rt-commit mailing list