irahardianto / service-pattern-go

Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.
https://irahardianto.github.io/service-pattern-go/
827 stars 121 forks source link

Possible SQL Injection #7

Open fairyhunter13 opened 5 years ago

fairyhunter13 commented 5 years ago

I have read your code and it is well-structured code. I learn a lot from reading your code. I see a possible bug cause of error in your GetPlayerByName method in your repository. Why don't you use a variable in SQL query, like '?', '$'? Because in the current context, your code might be injected.

elmehdiabdi-src commented 6 months ago

he just put exmple fast as possible he will not put this example to production! you can fix it if you want to use GetPlayerByName lol.