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

#1229: Replace rel=“author" with rel="noopener noreferrer" in footer #1243

Merged
merged 5 commits into from
Feb 16, 2020

Conversation

nielslange
Copy link
Member

Fixes #1229

Replaces rel=“author" with rel="noopener noreferrer" in

$links_output .= '<a href="https://woocommerce.com" target="_blank" title="' . esc_attr__( 'WooCommerce - The Best eCommerce Platform for WordPress', 'storefront' ) . '" rel="author">' . esc_html__( 'Built with Storefront &amp; WooCommerce', 'storefront' ) . '</a>.';

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @nielslange!

  • woocommerce.com is a domain owned by Automattic, so I think we can trust it. But at the same time, I don't see any drawback on setting rel="noopener noreferrer", so that part LGTM.
  • 💯 for the change in the string Built with....
  • About the rel="author" removal: while it looks like Google stopped using it for their search ranks, it doesn't seem to be completely deprecated so I initially thought that we should keep it. But at the same time, I don't think Storefront can be considered the author of all sites done with WooCommerce/Storefront. So it looks good to me to remove it. 👍

tl;dr I think this PR can be merged as-is. @haszari & @senadir thoughts?

Copy link
Member

@haszari haszari left a comment

Choose a reason for hiding this comment

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

I agree - this looks like a good change, thanks @shirokoweb @nielslange for raising & addressing this.

I looked up noreferrer / noopener (see also MDN) to better understand the security implications. Looks like we could catch things like this by using Lighthouse or other validator tools when testing.

Based on the Google docs, I think we should include either noreferrer / noopener - not both. I don't think this is a major blocker but it's worth tidying up now IMO. noopener seems like the right fit for our case; I don't see an issue with including referrer header from a site running storefront => woocommerce.com.

@haszari haszari added this to the 2.5.4 milestone Feb 13, 2020
@shirokoweb
Copy link

IMO, if you want to keep only one attribute instead of both, it should be noreferrer.

rel="noreferrer" attribute has the same effect as "noopener", but also prevents the Referer header from being sent to the new page.

Although this header has many innocent uses it can have undesirable consequences for user security and privacy. See Referer header: privacy and security concerns for more information and mitigations.

I'm not sure, logged in customers would be happy to potentially have some data sent to anybody, especially under GDPR.

@haszari
Copy link
Member

haszari commented Feb 13, 2020

IMO, if you want to keep only one attribute instead of both, it should be noreferrer.

Fair point @shirokoweb, and that's the most conservative (safest) option. I'm happy for us to go with noreferrer.

@haszari
Copy link
Member

haszari commented Feb 13, 2020

@nielslange can you review the suggested changes and commit to your branch? Then we can get this merged and wrapped up for 2.5.4. Thank you :) cc @Aljullu

nielslange and others added 2 commits February 14, 2020 12:57
Co-Authored-By: Rua Haszard <haszari@cartoonbeats.com>
Co-Authored-By: Rua Haszard <haszari@cartoonbeats.com>
@nielslange
Copy link
Member Author

@nielslange can you review the suggested changes and commit to your branch? Then we can get this merged and wrapped up for 2.5.4. Thank you :) cc @Aljullu

@haszari I've committed the requested changes so that this PR can be merged.

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.

Add rel="noopener" or rel="noreferrer" for Built with Storefront & WooCommerce in footer
4 participants