]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 419188: [SECURITY] email_in.pl lets you set the changer as @reporter instead...
authorlpsolit%gmail.com <>
Mon, 5 May 2008 04:56:42 +0000 (04:56 +0000)
committerlpsolit%gmail.com <>
Mon, 5 May 2008 04:56:42 +0000 (04:56 +0000)
email_in.pl

index 0c97af36f4cc6bba0c23f7dd5bb441bd6b844603..576aed81ac2d44e438b4c22a7a07ffe11529853a 100644 (file)
@@ -125,6 +125,16 @@ sub parse_mail {
             
             if ($line =~ /^@(\S+)\s*=\s*(.*)\s*/) {
                 $current_field = lc($1);
+                # It's illegal to pass the reporter field as you could
+                # override the "From:" field of the message and bypass
+                # authentication checks, such as PGP.
+                if ($current_field eq 'reporter') {
+                    # We reset the $current_field variable to something
+                    # post_bug and process_bug will ignore, in case the
+                    # attacker splits the reporter field on several lines.
+                    $current_field = 'illegal_field';
+                    next;
+                }
                 $fields{$current_field} = $2;
             }
             else {