h
h copied to clipboard
Search for annotations any *.wikidot.com page returns all annotations for all *.wikidot.com pages
trafficstars
wikidot serves wikis at http://[wiki-name].wikidot.com URLs. A search for annotations on any of these URLs returns all annotations for 'http://*.wikidot.com' pages.
Example query:
curl 'https://hypothes.is/api/search?uri=http%3A%2F%2Fsandbox.wikidot.com%2F'- Output: https://gist.github.com/robertknight/d882aef2cc9dce4fb284
Note that those annotations are all from different http://[wiki-name].wikidot.com pages.
This is happening because every wikidot page has a <link rel="alternate" href="javascript:WIKIDOT.page.listeners.editClick()" type="application/wiki"> link in the <head>.
Reported in https://hypothesis.zendesk.com/inbox/tickets/118
Ugh. Well, there are a handful of different things we should do here.
- First, because it will fix the issue, we should ignore things that don't look like reasonable URIs when computing equivalence. That would at least include ignoring
javascript:scheme URIs, and possibly extend as far as only paying attention to a limited number of valid schemes. - Then, optionally, we could add similar rules to the Annotator document plugin, so that we don't even try and submit such URLs, as well as in the API validation layer.