Skip to content
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

add whitelisted rel types for indieweb links #528

Closed
wants to merge 1 commit into from

Conversation

Floppy
Copy link
Contributor

@Floppy Floppy commented Aug 12, 2019

Various indieweb capabilities use link tags, with rels like me, webmention and pingback. Those don't need SRI or CORS, so this PR whitelists them.

I think there's a better approach to this using a blacklist of rel types rather than a whitelist - after all, the browser will only load certain types. I'll put together another PR for that (update, it's #529), but I wanted to get this simple fix in first in case that one proves more contentious.

If #529 is the preferred solution, this can either be binned or I can update it to just include the new test.

@Floppy Floppy requested a review from gjtorikian August 12, 2019 20:27
@codecov-io
Copy link

codecov-io commented Aug 12, 2019

Codecov Report

Merging #528 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #528      +/-   ##
==========================================
+ Coverage   98.38%   98.39%   +<.01%     
==========================================
  Files          30       30              
  Lines        1924     1928       +4     
==========================================
+ Hits         1893     1897       +4     
  Misses         31       31
Impacted Files Coverage Δ
spec/html-proofer/links_spec.rb 99.27% <100%> (ø) ⬆️
lib/html-proofer/check/links.rb 98.79% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ad140e...2fbdc87. Read the comment docs.

<head>
<link rel="me" href="https://github.com/gjtorikian/html-proofer"/>
<link rel="webmention" href="https://webmention.io/username/webmention" />
<link rel="pingback" href="https://webmention.io/username/xmlrpc" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't decided yet if this or #529 are preferable, but these should all be faked/broken/garbage links, to prove that they are being skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I can fix that if you prefer this solution over #529.

@fulldecent
Copy link
Collaborator

Preferring #529 over this since it better matches the specification, which is a whitelist.

@gjtorikian
Copy link
Owner

I trust @fulldecent.

@gjtorikian gjtorikian closed this Sep 7, 2019
@gjtorikian gjtorikian deleted the indieweb-link-rels branch September 7, 2019 11:11
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.

4 participants