Possible bug: Newline stripped on saving



  • Hello,

    I'm experiencing a strange behavior with my additional OpenVPN configuration. In the "Custom Options" field, I added the following configuration:

    tls-version-min 1.2
    client-connect "/usr/local/bin/ipdb-client-connect /mnt/persistent/ipdb.ini"
    client-disconnect "/usr/local/bin/ipdb-client-disconnect /mnt/persistent/ipdb.ini"
    

    I can save this configuration, everything works like expected. Now, if I want to edit the options again, the contents of the text field are modified to:

    tls-version-min 1.2
    client-connect "/usr/local/bin/ipdb-client-connect /mnt/persistent/ipdb.ini"client-disconnect "/usr/local/bin/ipdb-client-disconnect /mnt/persistent/ipdb.ini"
    

    (one newline stripped)

    I have to fix this before I press "Save" again, otherwise OpenVPN does not start due to errors. Also interesting: On boot time, OpenVPN does not start due to the same problem. I first have to open the configuration, add the missing newline, press save - then it works again.

    Is this a bug? Or is there any known solution for this?

    I'm using 2.4.4-RELEASE-p3 (amd64).

    Best regards
    Matthias


  • Rebel Alliance Developer Netgate

    Read the text underneath the Custom options box.



  • Yeah, this way it works. But why are some newlines stripped and some not?



  • @mlohr said in Possible bug: Newline stripped on saving:

    newlines

    Check what it really is, a newline character.
    You'll be surprised, it can be several things. pfSense probably doesn't recognize them all.


  • Rebel Alliance Developer Netgate

    @mlohr said in Possible bug: Newline stripped on saving:

    Yeah, this way it works. But why are some newlines stripped and some not?

    It doesn't matter, because newlines are not supported in that box. Use semicolons to separate entries and you'll never have to worry about it again.

    As to the why, it's probably a difference in browsers and UNIX/Windows newline styles, or who knows what. They're unreliable, hence the semicolon requirement.


Log in to reply