bugGNU nano - Bugs: bug #47292, the magic command accepts a lone...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #47292: the magic command accepts a lone quote

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 28 Feb 2016 10:03:37 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 28 Feb 2016 04:56:12 PM UTC, comment #1: 

Fixed in SVN, r5692 -- both the lone quote and the intermediate junk.

Benno Schulenberg <bens>
Group administrator
Sun 28 Feb 2016 10:03:37 AM UTC, original submission:  

When adding the following line to a syntax definition:

magic "

nano will accept this without protest and will add an empty regex string -- meaning that this syntax will match /any/ file.

Specifying a single doublequote after the header command will make nano complain about needing enclosing quotes, and will not add any header regex.

As already noted in bug #47289 (but that was with the patch already applied), currently the magic command accepts junk between different regexes.  The header command currently does not.

Also, magic, header, and extension regexes are currently allowed to be an empty string, which will match anything.  I think nano shouldn't accept such an empty string -- if the user wants to match /every/ file, she should be a bit more explicit, like with ".*".  But... maybe a few users already use this "" to switch off all syntax coloring (syntax "all" ""), so maybe we better keep accepting an empty string.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-02-28 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code