Skip to content

Make changes to the ABNF grammar for non-chainable directives - #151

Merged
nightwatchcyber merged 5 commits into
securitytxt:masterfrom
joker314:fix/abnf
Apr 19, 2019
Merged

nightwatchcyber merged 5 commits into
securitytxt:masterfrom
joker314:fix/abnf

Conversation

@joker314

@joker314 joker314 commented Apr 17, 2019

Copy link
Copy Markdown
Contributor

Resolves #150

This pull request adds:

  • Allow comments and fields in between a 'Canonical' field and a 'Preferred-Languages' field
  • Allow a 'Canonical' field to appear after a 'Preferred-Languages' field (i.e,. make the order irrelevant)
  • Allow a 'Canonical' field or 'Preferred-Languages' field to not appear (i.e., make them optional)
  • Add a history entry

Questions:

  • If a Canonical or Preferred-Languages field is ommitted, the grammar will effectively become *line *line. This, I think, will lead to a parsing ambiguity (i.e., which *line gobbles up more of the lines?), and is that bad (and is it avoidable)?
  • If the file is signed, I believe 'Canonical' becomes a 'SHOULD'. Do we need to make it a requirement in the grammar or is that only for 'MUST's?
  • It appears when I ran make txt, indentation for the ABNF section was lost. This is probably caused by a different version of the relevant tools, should I manually go in and re-indent all of the ABNF?

Comment thread draft-foudil-securitytxt.md
@joker314

joker314 commented Apr 18, 2019

Copy link
Copy Markdown
Contributor Author

I noticed that in the ABNF for ABNF, two spaces are placed after the equals sign so that everything lines up. However, for the URI ABNF (https://tools.ietf.org/html/rfc3986#appendix-A), instead of using =/, just / is used, and only one space is inserted after.

Which option should we use in order to keep things aligned?

@nightwatchcyber

Copy link
Copy Markdown
Contributor

I think two spaces should work

The other change is good "=/"

@nightwatchcyber
nightwatchcyber merged commit ea96300 into securitytxt:master Apr 19, 2019
@joker314
joker314 deleted the fix/abnf branch April 19, 2019 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ABNF mishandles non-chainable fields

2 participants