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

SQL Injection Docs Should Recommend Parameterized Queries #37783

Closed
tjakway opened this issue Jan 24, 2025 · 0 comments · Fixed by #37806
Closed

SQL Injection Docs Should Recommend Parameterized Queries #37783

tjakway opened this issue Jan 24, 2025 · 0 comments · Fixed by #37806
Labels
Content:Learn Learning area docs help wanted If you know something about this topic, we would love your help!

Comments

@tjakway
Copy link

tjakway commented Jan 24, 2025

MDN URL

https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/First_steps/Website_security

What specific section or headline is this issue about?

SQL Injection

What information was incorrect, unhelpful, or incomplete?

The MDN docs on SQL Injection recommend escaping user input to prevent SQL injection and do not mention prepared statements with parameterized queries.

What did you expect to see?

The page should be changed to:

  1. Advocate prepared statements with parameterized queries.
  2. Explicitly discourage (ever) allowing any user-controlled input in query strings.

This is industry-standard and any database API that lacks this should be avoided.

Do you have any supporting links, references, or citations?

OWASP's SQL Injection page (archive link) recommends prepared statements with parameterized queries and says escaping all user input is "STRONGLY DISCOURAGED".

Do you have anything more you want to share?

No response

@tjakway tjakway added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 24, 2025
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! Content:Security Security docs Content:Learn Learning area docs and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. Content:Security Security docs labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Learn Learning area docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants