]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Deal with case-sensivity in Content-Disposition parser
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 10:26:48 +0000 (11:26 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Sep 2019 10:26:48 +0000 (11:26 +0100)
src/ragel/content_disposition.rl

index 614d54c68b62bfddebf6e89121961e548158088d..abcd7796f2a79332fca794eefd53a3828c044538 100644 (file)
@@ -18,9 +18,9 @@
   parameter = CFWS? attribute FWS? "=" FWS? value CFWS?;
 
   ietf_token = token+;
-  custom_x_token = 'x' "-" token+;
+  custom_x_token = /x/i "-" token+;
   extension_token = ietf_token | custom_x_token;
-  disposition_type = 'inline' %Disposition_Inline | 'attachment' %Disposition_Attachment
+  disposition_type = /inline/i %Disposition_Inline | /attachment/i %Disposition_Attachment
     | extension_token >Disposition_Start %Disposition_End;
   disposition_parm = parameter;
   content_disposition = disposition_type (";" disposition_parm)*;