Incomplete sanitization of text strings
See original GitHub issueLGTM reports the following line does incomplete sanitization, introduced in 61cfe58.
This line only replaces the first instance of <
, which i’m guessing is not what you intended to do?
Would it not be better to handle this for both subject and status, and in the same way, making sure that any potential character which may mess up the SVG is escaped? (I forsee users wanting to e.g. use <
or >
characters to talk about version compatibility) This would probably be better handled in badgen
than badgen-service
right, so any other users of the library will also benefit.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Incomplete string escaping or encoding - CodeQL - GitHub
Incomplete string escaping or encoding¶ ... Sanitizing untrusted input is a common technique for preventing injection attacks such as SQL injection or cross-site ......
Read more >Incomplete string escaping or encoding - Stack Overflow
i ran a Code Scanning in Github in my repo , and this line in my JS file t.location.href.split("#")[0].replace(/<[^>]*>/g ...
Read more >How to Prevent Web Attacks Using Input Sanitization
However, incomplete sanitization is not much better. Here are a few of the possible attack paths to think about.
Read more >Top ten ways to clean your data - Microsoft Support
Misspelled words, stubborn trailing spaces, unwanted prefixes, improper cases, and nonprinting characters make a bad first impression.
Read more >SafeHtmlUtils (GWT Javadoc)
Returns a SafeHtml constructed from a safe string, i.e., without escaping the ... must end in "inner HTML" context and not contain incomplete...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Woah 20% drop is quite a bit… Did you use a benchmarking tool for this or was it just some simple tests?
Ah yeah that would definitely be a problem, hmm.
Fixed in 550a136