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

[jsx-no-target-blank] Doesn't fail when external url is put in a variable #1776

Closed
kenearley opened this issue Apr 27, 2018 · 1 comment
Closed

Comments

@kenearley
Copy link

kenearley commented Apr 27, 2018

This is considered an error:

var Hello = <a target='_blank' href="http://example.com/"></a>

This is not an error:

var url = "http://example.com/"
var Hello = <a target='_blank' href={ url }></a>

Since the vulnerability we are trying to prevent is user generated links to malicious sites, this rule seems too lax.

@kenearley kenearley changed the title [jsx-no-target-blank] Does't fail when external url is put in a variable [jsx-no-target-blank] Doesn't fail when external url is put in a variable Apr 27, 2018
@kenearley
Copy link
Author

kenearley commented May 11, 2018

Oops! This seems to be a duplicate of #1737

@ljharb ljharb closed this as completed May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants