so-sql-injections icon indicating copy to clipboard operation
so-sql-injections copied to clipboard

Add multiple languages?

Open plessbd opened this issue 7 years ago • 6 comments

I have not had the chance to look into the code, but how hard would it be to add other languages.

Like Perl, python, java, javascript?

plessbd avatar Dec 05 '16 18:12 plessbd

Should be relatively easy. The changes to make would be:

  • Add the regexes to this file to detect the SQL injections:

https://github.com/laurent22/so-sql-injections/blob/master/src/AppBundle/InjectionFinder.php

  • Add a "language" property to the question table so that we know which programming language was used.

  • Add the relevant language tags (js, python, etc.) to the StackExchange API query:

https://github.com/laurent22/so-sql-injections/blob/master/src/AppBundle/StackExchangeApi.php

And I think that's about it for the backend. Then it's all about updating the front-end to take these other languages into account.

If you or someone else is interested in developing this, feel free to submit a PR.

laurent22 avatar Dec 05 '16 21:12 laurent22