Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Enhancements to origin(s) property #97

Open
linuxwolf opened this issue Mar 16, 2018 · 1 comment
Open

Enhancements to origin(s) property #97

linuxwolf opened this issue Mar 16, 2018 · 1 comment
Labels

Comments

@linuxwolf
Copy link
Contributor

The current input validation for origins allows the value of each array element to be any string under 500 characters. However, this has implications that complicate other implementations (e.g., more complete site-name/origin matching).

In essence, the idea is for the datastore to help follow this gist.

  • At a minimum, the resulting value of each array element in origins must match {scheme}//{hostname}/{path}?{query}#{hash}; /{path}, ?{query}, and #{hash} are optional.

  • In addition to the search hashes called for in the gist, a search hash for the complete value is also generated if a /{path}, ?{query}, or #{hash} are present.

  • When adding an item, any origins present are coerced into the above pattern; if the array element does not match the pattern then it is treated as a if it were a simple domain name (prepending it with "https://" and ending with "/").

  • Existing data is coerced into this pattern when updating items

  • When retrieving items, it may coerce any origins values into the above format

@linuxwolf
Copy link
Contributor Author

Related to mozilla-lockwise/lockbox-extension#521

@devinreams devinreams added feature and removed backlog We have looked at and understand the issue. Prioritized with alignment to product initiatives. MVP P1-must-have labels Mar 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants