[Rt-commit] rt branch, 4.4/munge-more-attachments, repushed

? sunnavy sunnavy at bestpractical.com
Fri Jan 25 16:26:34 EST 2019


The branch 4.4/munge-more-attachments was deleted and repushed:
       was e8b802731b5433018a17bbaa6bc2b879c9a631b0
       now e644561d85fe1216ca3ede6fd279c3ee29508c01

1: 67d87737c = 1: 67d87737c Abstract method to return the list of mime types that indicate email messages
2: 0d603e83f ! 2: a7ac92d73 Refactor ReplaceAttachments method mainly to cover more attachments
    @@ -5,7 +5,7 @@
         Previously we only replaced attachments of "text/plain" and "text/html",
         which is good enough for "Content" replacement but sadly not for
         "Headers", as we missed quite common types like "multipart/mixed" and
    -    more. This commits imporves "Headers" replacement by covering all the
    +    more. This commit imporves "Headers" replacement by covering all the
         types of "multiplart/*" and also embeded email ones like
         "message/rfc822", 'message/partial' and 'message/external-body'.
         
3: a342442b3 ! 3: e65d6dfa4 Munge quoted-printable attachments if the searched string keeps intact in QP
    @@ -9,6 +9,9 @@
              SUBCLAUSE       => 'Encoding',
          );
      
    ++    # For QP encoding, if encoded string is equal to the decoded
    ++    # version, then SQL search will also work.
    ++    #
     +    # Adding "\n" is to avoid trailing "=" in QP encoding
     +    if ( MIME::QuotedPrint::encode("$args{Search}\n") eq "$args{Search}\n" ) {
     +        $attachments->Limit(
4: d62e36c75 = 4: 7eb065e87 Re-encode decoded attachment content on update for content replacement
5: 1ab8d8ce8 = 5: fe491abaa Make ReplaceHeaders/ReplaceContent return true only if replacement happens
6: 45df2c877 ! 6: 05d2bacab Add --tickets to munge more attachments that have encoded content
    @@ -41,6 +41,9 @@
     -        SUBCLAUSE       => 'Encoding',
     -    );
     -
    +-    # For QP encoding, if encoded string is equal to the decoded
    +-    # version, then SQL search will also work.
    +-    #
     -    # Adding "\n" is to avoid trailing "=" in QP encoding
     -    if ( MIME::QuotedPrint::encode("$args{Search}\n") eq "$args{Search}\n" ) {
     +    if ( $args{FilterBySearchString} ) {
    @@ -57,6 +60,9 @@
     +            SUBCLAUSE => 'Encoding',
     +        );
     +
    ++        # For QP encoding, if encoded string is equal to the decoded
    ++        # version, then SQL search will also work.
    ++        #
     +        # Adding "\n" is to avoid trailing "=" in QP encoding
     +        if ( MIME::QuotedPrint::encode("$args{Search}\n") eq "$args{Search}\n" ) {
     +            $attachments->Limit(
7: cfe755fbe ! 7: 2cad99767 Make sure search/replacement strings to munge are decoded ones
    @@ -9,8 +9,8 @@
     --- a/lib/RT/Attachments.pm
     +++ b/lib/RT/Attachments.pm
     @@
    -         );
    - 
    +         # version, then SQL search will also work.
    +         #
              # Adding "\n" is to avoid trailing "=" in QP encoding
     -        if ( MIME::QuotedPrint::encode("$args{Search}\n") eq "$args{Search}\n" ) {
     +        if ( MIME::QuotedPrint::encode( Encode::encode( 'UTF-8', "$args{Search}\n" ) ) eq
8: e8b802731 = 8: e644561d8 Add tests for rt-munge-attachments with --tickets



More information about the rt-commit mailing list