Earlier quoted context omitted.
In this vein, one thing I'm not seeing (although I haven't finished reading the "book" yet) is built-in CSRF protection. While not difficult to implement correctly yourself, I've found that applications written on frameworks that don't include this in the box tend to be applications vulnerable to CSRF.
https://github.com/SergioBenitez/Rocket/issues/14
Show HN: Rocket – Web Framework for Rust
111–120 of 123 posts
Re: Show HN: Rocket – Web Framework for Rust
#112I am not a web development guy, so this question might seem ridiculous: To me, it always seems that there are a lot of hazards in any web development project, security-wise: A number of attacks, be it injections, XSS, etc. When seeing a new web development framework, I always ask myself: Are the basic security concerns known today addressed? How can I make sure that choosing cool web framework in language X doesn't l…
Re: Show HN: Rocket – Web Framework for Rust
#113Re: Show HN: Rocket – Web Framework for Rust
#114Earlier quoted context omitted.
There's nothing that makes typed languages inherently more verbose; a Haskell script will tend to be substantially shorter than the equivalent Python. Rust gives you much more control over how your program runs, but this necessarily means paying a price in expressiveness.
>a Haskell script will tend to be substantially shorter than the equivalent Python. someone offered a counter-example where a JSON parser had more lines of type definitions in Haskell than total lines of code in Python
If you link me the example maybe I can provide a Haskell version using lens.
Re: Show HN: Rocket – Web Framework for Rust
#115Earlier quoted context omitted.
I wrote a long reply, but ended up erasing it and I'll just say that many of these vulnerabilities are due to the programmer using one type (i.e. string) to represent all kinds of data that might be malicious and unsanitized, and then losing track of whether a piece of data is safe for use (e.g. to be sent to DB) or not. I recommend checking out the Yesod web framework [0], which leverages Haskell's strong type syste…
Yesod doesn't prevent all of them. You can use "javascript:" to still do XSS, last time I checked. This is because that kind of content is valid in HTML... but maybe not what you wanted to happen
Re: Show HN: Rocket – Web Framework for Rust
#116Re: Show HN: Rocket – Web Framework for Rust
#117I am not a web development guy, so this question might seem ridiculous: To me, it always seems that there are a lot of hazards in any web development project, security-wise: A number of attacks, be it injections, XSS, etc. When seeing a new web development framework, I always ask myself: Are the basic security concerns known today addressed? How can I make sure that choosing cool web framework in language X doesn't l…
The canonical resource I'm aware of is the OWASP project.[0-3] Basically though, always escape user-supplied data (and make sure you're correctly escaping it for the contexts of where it ends up[4]), don't roll your own crypto/authentication, and stick to using battle-tested libraries. (If security matters that much to your app, stick to "boring established framework X" and let other people choose "cool new framework…
For once, modern implementations are actually really helping security.
Re: Show HN: Rocket – Web Framework for Rust
#118Earlier quoted context omitted.
I wrote a long reply, but ended up erasing it and I'll just say that many of these vulnerabilities are due to the programmer using one type (i.e. string) to represent all kinds of data that might be malicious and unsanitized, and then losing track of whether a piece of data is safe for use (e.g. to be sent to DB) or not. I recommend checking out the Yesod web framework [0], which leverages Haskell's strong type syste…
Yesod doesn't prevent all of them. You can use "javascript:" to still do XSS, last time I checked. This is because that kind of content is valid in HTML... but maybe not what you wanted to happen
Re: Show HN: Rocket – Web Framework for Rust
#119Earlier quoted context omitted.
Yesod doesn't prevent all of them. You can use "javascript:" to still do XSS, last time I checked. This is because that kind of content is valid in HTML... but maybe not what you wanted to happen
I don't see why javascript: is fundamentally different than other XSS vectors
but it doesn't prevent all of them
Re: Show HN: Rocket – Web Framework for Rust
#120I am not a web development guy, so this question might seem ridiculous: To me, it always seems that there are a lot of hazards in any web development project, security-wise: A number of attacks, be it injections, XSS, etc. When seeing a new web development framework, I always ask myself: Are the basic security concerns known today addressed? How can I make sure that choosing cool web framework in language X doesn't l…
This is actually the million dollar question, not remotely ridiculous. A lot of web frameworks are built with ease of use, productivity, and "fun" for developers in mind, but neglect security at the framework level, instead leaving security to be reimplemented by the devs on every new project. But the whole point of a framework is to encapsulate all the things that you have to implement for every new web project, so…
I am writing "answers", plural, because although I post this as an answer to SkyMarshals text, I also mean the replies by aban, peller, and petilon.