6 ms·
If you're considering writing it in C, you probably have some reason why you don't want to use a scripting language. To that end, I'd suggest using something li
by lilyball 10y ago
If you're considering writing it in C, you probably have some reason why you don't want to use a scripting language. To that end, I'd suggest using something like Rust instead of C.
- clarry 10y agoMaybe I'm writing it in C because I like the language, enjoy using it and am good with it? And I know it works everywhere I want it, even years later? I hate to be told what I should or shouldn't use.
- Nullabillity 10y agoAnd your users will certainly enjoy all the security issues your code will have.
- comex 10y agoNot the person you replied to, but I'm actually quite conflicted on this count. I enjoy C, both aesthetically and for its performance, yet I care a lot about security, so I feel obligated to avoid C for anything important. I'm a big fan of Rust, but it's nowhere near replicating what I like about C.
- z3t4 10y agoSomeone with say 10-20 years of experience in a language will write a more secure program then someone just started in any language ... And even if you program in a "safe" language, you still make bugs, and all those bugs passed the compiler/parser, so your language obviously didn't help you there. There are a lot of code written in C in the wild, witch means there are also a lot of bad code.
- Nullabillity 10y agoThere are business logic bugs, and there are memory corruption bugs. One of those leads to RCEs a lot more often than the other. One of those is a lot easier for the compiler to prevent than the other.
- Sanddancer 10y agoYes, but there are ways to prevent most memory corruption bugs, even, if you're using an OS with a non-terrible malloc implementation. The gnu malloc that most people know is a terrible antiquity that should have been replaced decades ago -- mallocs like OpenBSD's make a lot of memory corruption bugs a lot harder to exploit.
- qwertyuiop924 10y agoBut not harder to have exist in the first place.
- module0000 10y agoSomeone who capably sets out to write their web application back-end in C most likely is aware of any security issues. If they exist in the finished product, their presence is going to be due to laziness, not ignorance.
- lilyball 10y agoGiven the fact that virtually every significant piece of C software has some sort of vulnerability in it, this comment is demonstrably false.
- module0000 10y ago> virtually every significant piece of C software has some sort of vulnerability in it The GNU 'echo' program is pretty significant, in the sense it's installed widely, and used widely. What sort of vulnerability exists?
- x3ro 10y agovirtually, adverb [ as submodifier ] nearly; almost: the disease destroyed virtually all the vineyards in Orange County | the college became virtually bankrupt.
- deleted 10y ago[deleted]
- lilyball 10y agoYou don't get points for internet pedantry. Especially when it should be obvious that you're choosing to use a definition of "significant" that doesn't match what I was using in my comment.
- nickpsecurity 10y agoThen you shouldn't like BCHS or pledge because the author likewise tells you that you should use it and not other things. Regardless of that, this page is all about making the web apps secure. The BCHS page talks something similar. Then, within all this, they recommend a language that goes out of its way to make apps insecure when alternatives exist that don't. Big communities behind some these days. Recommending against C for web apps is wise in this context.
- clarry 10y ago> Then you shouldn't like BCHS or pledge because the author likewise tells you that you should use it and not other things. What a non sequitur. That I do not like being told what to (not) use has no bearing whatsoever on whether I can like or dislike the thing that someone somewhere is advocating for or against.
- nickpsecurity 10y agoThat was partly my point. You bring up you don't like being told what you should or shouldn't use. Yet, you use a product doing exactly that of your own free will. You probably started to after someone shared a link to affect your decision-making. So, a pointless counter in reply to up-thread recommendations.
- clarry 10y agoDo we speak a different language? Because again I just do not understand how any of what you're saying follows. Yes, I use C. Is the programming language telling me to use this or that? No, I am telling it to do this or that. And no, I am not using it because somebody told me to. I am using it because (as I said above), I like it, I enjoy using it, I am good with it, and feel like it's a good fit for the values I hold. Opinions shared by other people may have affected my perception, but I am not using the language because somebody tells me to.
- nickpsecurity 10y ago
- deleted 10y ago[deleted]
- acedinlowball 10y agoThen maybe you need to do a better job of shielding yourself from other peoples' opinions? It sounds like might be a little too sensitive and temperamental to engage in mutually beneficial discourse. Please remove yourself.
- fosap 10y agoNot even the Plan 9 People use C for web development. And the plan 9 folks _really_ like c.
- duneroadrunner 10y agoAnother choice is SaferCPlusPlus[1] (optionally with a framework like Wt[2]). Using a higher level language (than C) arguably has the drawback of "hiding complexity" in exchange for better productivity and scalability. But languages like Rust and C++ (with SaferCPlusPlus) retain much of the intrinsic performance and memory efficiency of C, without introducing an additional runtime layer. That may allow you to employ extra (diverse) layers of sandboxing/jailing and other security/correctness solutions. [1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus https://github.com/duneroadrunner/SaferCPlusPlus [2] https://www.webtoolkit.eu/wt https://www.webtoolkit.eu/wt