You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec says that noreferrer implies noopener, so it should always suffice to write just rel="noreferrer".
However, if you configure rule react/jsx-no-target-blank to allowReferrer, then links with rel="noreferrer" specified fail, even though it's equivalent to rel="noreferrer noopener".
Confusingly, the error message says Using target="_blank" without rel="noreferrer" is a security risk which makes it particularly tricky to figure out what's going on. (In my case, I forgot that I'd turned on allowReferrer.) I imagine it's not possible to configure the error message depending on the configuration?
I think configuring the error message should be trivial; as for allowing noreferrer to exist alone, that was very intentionally disallowed, but was relaxed in #2043.
The spec says that
noreferrer
impliesnoopener
, so it should always suffice to write justrel="noreferrer"
.However, if you configure rule
react/jsx-no-target-blank
toallowReferrer
, then links withrel="noreferrer"
specified fail, even though it's equivalent torel="noreferrer noopener"
.Confusingly, the error message says
Using target="_blank" without rel="noreferrer" is a security risk
which makes it particularly tricky to figure out what's going on. (In my case, I forgot that I'd turned onallowReferrer
.) I imagine it's not possible to configure the error message depending on the configuration?Related discussion in #2054.
The text was updated successfully, but these errors were encountered: