Bug 2431 - Form feed is not treated as whitespace in config files.
Summary: Form feed is not treated as whitespace in config files.
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 6.9p1
Hardware: All All
: P5 trivial
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks: V_7_5
  Show dependency treegraph
 
Reported: 2015-07-17 23:44 AEST by Andreas Seltenreich
Modified: 2018-04-06 12:26 AEST (History)
3 users (show)

See Also:


Attachments
allow \f at EOL (1.07 KB, patch)
2017-02-03 15:18 AEDT, Damien Miller
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Seltenreich 2015-07-17 23:44:10 AEST
Form feeds (aka \f, \014, ^L) are sometimes used to separate logical
sections in bigger files.  Support for navigating files based on these
sections is common in editors.  For example, vi can jump to the next
one using ]] and Emacs using C-x ].

I am used to insert them in all kinds of config files to ease
navigation as soon as their size becomes unwieldy.  To my surprise,
inserting one in ~/.ssh/config produced a syntax error instead of
treating it as whitespace, as every other config file parser I've
come about until now does.
Comment 1 Damien Miller 2017-02-03 15:18:27 AEDT
Created attachment 2938 [details]
allow \f at EOL

This allows \f characters to appear at EOL (well, strictly as part of a whitespace sequence at EOL). I don't think it makes sense to allow \f as a token-splitting character.
Comment 2 Damien Miller 2017-02-03 16:08:46 AEDT
Fixed in:

commit c924b2ef941028a1f31e6e94f54dfeeeef462a4e
Author: djm@openbsd.org <djm@openbsd.org>
Date:   Fri Feb 3 05:05:56 2017 +0000

    upstream commit
    
    allow form-feed characters at EOL; bz#2431 ok dtucker@
    
    Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2
Comment 3 Damien Miller 2018-04-06 12:26:34 AEST
Close all resolved bugs after release of OpenSSH 7.7.