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

Rule S2819: update issue message #2932

Closed
pierre-loup-tristant-sonarsource opened this issue Jan 20, 2022 · 0 comments · Fixed by #2956
Closed

Rule S2819: update issue message #2932

pierre-loup-tristant-sonarsource opened this issue Jan 20, 2022 · 0 comments · Fixed by #2956
Assignees
Labels
type: enhancement Improving existing functionality
Milestone

Comments

@pierre-loup-tristant-sonarsource
Copy link

pierre-loup-tristant-sonarsource commented Jan 20, 2022

When the issue is raised on a EventTarget.addEventListener() the message is:

Verify the origin of the received message.

window.addEventListener("message", function(event) { // Noncompliant: "Verify the origin of the received message."
      console.log(event.data);
 }); 

When the issue is raised on a Window.postMessage() the message is:

Specify a target origin for this message.

var iframe = document.getElementById("testiframe");
iframe.contentWindow.postMessage("secret", "*"); // Noncompliant: "Specify a target origin for this message."

Once the change is implemented, merge https://github.com/SonarSource/rspec/pull/732/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improving existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants