#151 Long configuration file lines cause errors

2.7.3
closed-fixed
opendkim (95)
6
2013-01-07
2012-12-15
No

/tmp/opendkim.conf
Syslog yes
UMask 002
Domain sweetdomain.com,veryseetcomain.com,........................(2K worth of text).

failes with "configuration error at line 15: unrecognized parameter"

A. the error isn't right or helpful
B. its not long enough. What's 10K instead of 1K on the heap during parsing.
C. it fails even if its a comment

Why is this an issue? virtualmin decides to user Domain join(',',@alldomains) rather than something sensible like KeyTable. (they are getting the next bug report :-).

(patch in progress)...

Discussion

  • Daniel Black

    Daniel Black - 2012-12-15

    fix with testcase

     
  • Daniel Black

    Daniel Black - 2012-12-15
    • summary: config long input lines cause errors --> [PATCH] config long input lines cause errors
     
  • Daniel Black

    Daniel Black - 2012-12-16

    More so line 15 was the empty line just to make the error harder to contemplate. fgets read 1023 characters and considered whatever truncated domain that was there as the next line. Very confusing. I didn't expect a config file parser to be complicated but apparently it can be.

    good news. virtualmin this issue on their side. https://www.virtualmin.com/node/24556

    and substandard keys: https://www.virtualmin.com/node/24558
    and making it the default with Debian 6: https://www.virtualmin.com/node/24555

     
  • Murray S. Kucherawy

    We should definitely figure out line boundaries properly. That fixes (A) and (C) in your list.

    However, I don't think we need to go out of our way to cater to people packing 2K lines into opendkim.conf, because any configuration that big should really be availing itself of other data sets than "csl" for lists of domain names and the like. Extending the line buffer size only prolongs bad behaviour.

    Thanks for the patches. I'll work with them.

     
  • Murray S. Kucherawy

    • priority: 5 --> 6
    • assigned_to: nobody --> cm-msk
     
  • Murray S. Kucherawy

    • summary: [PATCH] config long input lines cause errors --> Long configuration file lines cause errors
     
  • Murray S. Kucherawy

    Done for 2.7.4.

     
  • Murray S. Kucherawy

    Fix for this bug included in new release.

     
  • Murray S. Kucherawy

    • status: open --> closed-fixed
     

Log in to post a comment.