Skip to content

Make placeholder for the generator RFC compliant - #24

Merged
EdOverflow merged 1 commit into
securitytxt:masterfrom
joker314:master
Jan 11, 2019
Merged

EdOverflow merged 1 commit into
securitytxt:masterfrom
joker314:master

Conversation

@joker314

Copy link
Copy Markdown
Contributor

Based on the security.txt RFC specification (section 3.4.2), the Contact: directive "MUST" follow RFC3986.

The value MUST follow the general syntax described in [RFC3986].
This means that "mailto" and "tel" URI schemes MUST be used when
specifying email addresses and telephone numbers.

Therefore,

- security@example.com
+ mailto:security@example.com

Upon Googling, I believe that this placeholder may be partially responsible for invalid security.txt files which specify emails without the mailto: scheme.

This pull request has not been tested.

@EdOverflow

Copy link
Copy Markdown
Member

I think we used to automatically prefix the input with mailto: and this has since been removed from https://github.com/securitytxt/securitytxt.org/blob/master/js/genform.js. From a UX point of view, I am interested to know if it makes more sense requiring the user to type mailto: or have them submit their email address and let the JavaScript code do the prefixing. What would you suggest doing, @joker314?

@joker314

Copy link
Copy Markdown
Contributor Author

@EdOverflow Would we do it like this: if the input contains a @ but does not start with https:// or http:// we prefix it with mailto; if it's fairly numeric we prefix it with tel:; and otherwise we error?

I think that could work, but another option is to have a dropdown to the left of the text input field, screenshot below:

Dropdown to the left of inputbox, with "Email" selected

@EdOverflow

Copy link
Copy Markdown
Member

Oh, I love the sound of having a dropdown for the Contact: directive!

@joker314

joker314 commented Aug 27, 2018

Copy link
Copy Markdown
Contributor Author

Does securitytxt.org have a minimum version of Internet Explorer it must support? I notice flexbox is already being used, I withdraw the question.

@joker314

Copy link
Copy Markdown
Contributor Author

While there might be better solutions, this placeholder is misleading because it isn't valid, and could be contributing to the creation of noncompliant files. I suggest we merge this PR and then follow-up with e.g. a drop down? Do you agree @EdOverflow?

@EdOverflow

Copy link
Copy Markdown
Member

Sounds good to me. :)

@EdOverflow
EdOverflow merged commit d85b565 into securitytxt:master Jan 11, 2019
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.

2 participants