Skip to content

Should fail checks at manifest parse time, not launch time #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mgiuca opened this issue Nov 27, 2017 · 1 comment
Closed

Should fail checks at manifest parse time, not launch time #25

mgiuca opened this issue Nov 27, 2017 · 1 comment

Comments

@mgiuca
Copy link
Collaborator

mgiuca commented Nov 27, 2017

There are a number of cases where the launching algorithm can fail, due to an invalid url_template, with no satisfactory way to give feedback to the user or developer. Instead of failing these checks silently at launch time, we should specify checks at manifest parse time, and if the template is invalid, specify that it be ignored (i.e., not registered) and that a developer warning be issued.

@mgiuca
Copy link
Collaborator Author

mgiuca commented Nov 27, 2017

An interesting edge case is the manifest scope check:

If final URL is not within scope of manifest's scope URL, abort these steps.

This check is done after placeholder substitution, which means you could theoretically have a scope of "/foo/bar" and a url_template of "/foo/{text}", and then if the shared text starts with "bar" it will succeed, but otherwise will fail. That is kind of bad. By moving the checks to manifest parse time, we will have to apply the check to the URL template, not the final URL, but that is good because it rules out cases such as the above.

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

No branches or pull requests

1 participant