|
|
Log in / Subscribe / Register

String based HTML building

String based HTML building

Posted May 9, 2026 5:41 UTC (Sat) by pabs (subscriber, #43278)
Parent article: Forgejo "carrot disclosure" raises security questions

I note in the patch to quote attributes that Forgejo are doing string based HTML building in JavaScript. Not using DOM based HTML building (document.createElement and friends) is a pretty poor security practice, so it doesn't surprise me that Forgejo code could be full of other insecure practices. Of course many other codebases create HTML this way. Probably the JavaScript ecosystem needs to deprecate and remove string based HTML building methods altogether.

Same goes for os.system() in Python and other sharp-edged APIs elsewhere.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds