Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming Language that does not permit XSS, SQL Injection [closed]

Is there yet a programming language that will prevent XSS and SQL Injection.

My thoughts are something that is context aware and will correctly encode when necessary. For example, if a string is used in a call to an SQL function, it is quoted unless you tell it to not be quoted. And if you place the variable into a string that is printed, then context-aware encoding is used, knowing whether the code is found in HTML Attribute, HTML fully-formatted (with non breaking spaces and returns), or CSS, Script.

Does such a language exist? One that

  • Encodes by default, unless you say otherwise,
  • Includes considerations for different contexts (HTML, Script at least)
  • Does all the context-aware stuff at compile time,
  • It does not need to compile to bytecode. A popular high-level language will do.
like image 641
700 Software Avatar asked Jul 17 '26 18:07

700 Software


1 Answers

You could surely take a look at OPA and Ur/Web, both of them enforce safety/security (to a varying degree).

like image 151
Artyom Shalkhakov Avatar answered Jul 20 '26 20:07

Artyom Shalkhakov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!