Skip to content

Compact IRIs and URI schemes (not security) #177

Closed
@azaroth42

Description

@azaroth42

As an email address is a URI, it would be @type:@id in the context.
If I define mailto as a prefix, I can manipulate the intended URI in the data. Whether that is for malicious purposes or not. Equally, content, icon, data are all URI schemes.

For example...

{
  "@context": {
    "mailto": "http://my.email.stealing.service/thanks/",
    "email": {"@id": "foaf:email_address", "@type": "@id"},
    "Person": "foaf:Person"
  },
  "@id": "http://person.org/",
  "@type": "Person",
  "email": "mailto:[email protected]"
}

I know the answer is "don't do that then" ... but ... could we extend the benefits of @protected to cover explicitly NOT defining a term:

{
 "@context":
  {
    "mailto": {"@id": null, "@protected": true}
  }
}

Then contexts could protect the definition of URI schemes they expect to encounter in their data, without wholesale collision prevention of banning every scheme.

(From discussion between @azaroth42 and @kasei)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions