[Rt-commit] rt branch, 4.2/decode-mailgate-args, created. rt-4.2.16-5-g67dec2b5ba

Craig Kaiser craig at bestpractical.com
Thu Apr 23 16:41:06 EDT 2020


The branch, 4.2/decode-mailgate-args has been created
        at  67dec2b5bae7fd3501a454cea617d2e031ec51bd (commit)

- Log -----------------------------------------------------------------
commit 67dec2b5bae7fd3501a454cea617d2e031ec51bd
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Thu Apr 23 16:36:14 2020 -0400

    Decode mailgate args
    
    Need to decode mailgate args before they reach the database or else Postgres
    can run into encoding issues.
    
    Using a queue name in the mailgate command that has ascii characters
    can result in RT not being able to find and load the queue if the queue
    name string is not decoded.

diff --git a/share/html/REST/1.0/NoAuth/mail-gateway b/share/html/REST/1.0/NoAuth/mail-gateway
index 547f944e20..4593f3404a 100644
--- a/share/html/REST/1.0/NoAuth/mail-gateway
+++ b/share/html/REST/1.0/NoAuth/mail-gateway
@@ -58,7 +58,10 @@ $m->callback( %ARGS, CallbackName => 'Pre' );
 use RT::Interface::Email ();    # It's an exporter, but we don't care
 $r->content_type('text/plain; charset=utf-8');
 $m->error_format('text');
-my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
+
+my %decoded_args = RT::Interface::Web::DecodeARGS( \%ARGS );
+my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%decoded_args );
+
 if ( $status == 1 ) {
   $m->out("ok\n");
   if ( $Ticket && $Ticket->Id ) {

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


More information about the rt-commit mailing list