Live data from Hacker News

Sails.js: Realtime MVC framework for Node.js

balderdashy.github.com

41–50 of 107 posts

Re: Sails.js: Realtime MVC framework for Node.js

#41
post #24
post #23

Earlier quoted context omitted.

I guess you mean hard realtime. What usually on the web is called realtime is soft realtime IMHO.

Sure I get, but I think it just dilutes the meaning of the term "real-time" to use it in a soft context.

Well I guess this depends on the context. Usually when I talk about real-time I talk about soft real-time and explicitly state "hard" when I talk about hard real-time (which I don't really do as I don't do hard real-time ;)).

Re: Sails.js: Realtime MVC framework for Node.js

#42
post #39

Earlier quoted context omitted.

Avoiding GET requests is not a fool proof way to mitigate CSRF. If your website has just one XSS vulnerability an attacker can send POST requests. It's much better to use some kind of token that is always sent with your forms.

There's nothing stopping anyone from sending POST requests to wherever he wants, even without an XSS. the same-domain origin policy only forbids you from reading the response, not from sending the request. CSRF-wise, POST requests are just as vulnerable as GET requests. Also, if someone does manage to find an XSS vulnerability, using a CSRF token won't be any good - the attacker can simply read the token from your we…

No. Before performing a POST/PUT/DELETE or any other method with side effect to another domain your brother will issue an OPTIONS to get authorization first and will never perform the request if the server do not authorize it.

Then if your authentication is cookie based and you allow to delete resource via GET then all the attacker have to do is to insert or tag on any other domain with the proper src attribute to delete your content silently.

These endpoints are a VERY bad idea and are absolutly not REST. RESTful do not mean CRUD.

Re: Sails.js: Realtime MVC framework for Node.js

#43
post #7

Earlier quoted context omitted.

I don't think that solves the underlying problem of side effect-ful/dangerous GET requests that may be easily exploited via CSRF attacks. You really don't want to expose POST/PUT/DELETE actions via GET.

Avoiding GET requests is not a fool proof way to mitigate CSRF. If your website has just one XSS vulnerability an attacker can send POST requests. It's much better to use some kind of token that is always sent with your forms.

And if you have zero XSS vulnerabilities, they may be able to trick users into interacting with a form on a site they control (the "CS" of "CSRF"). CSRF token is definitely necessary.

Reference: https://www.owasp.org/index.php/Top_10_2013-A8-Cross-Site_Re...

Re: Sails.js: Realtime MVC framework for Node.js

#44
post #42
post #39

Earlier quoted context omitted.

There's nothing stopping anyone from sending POST requests to wherever he wants, even without an XSS. the same-domain origin policy only forbids you from reading the response, not from sending the request. CSRF-wise, POST requests are just as vulnerable as GET requests. Also, if someone does manage to find an XSS vulnerability, using a CSRF token won't be any good - the attacker can simply read the token from your we…

No. Before performing a POST/PUT/DELETE or any other method with side effect to another domain your brother will issue an OPTIONS to get authorization first and will never perform the request if the server do not authorize it. Then if your authentication is cookie based and you allow to delete resource via GET then all the attacker have to do is to insert or tag on any other domain with the proper src attribute to de…

``s are allowed to send POST requests to wherever they want, without any restrictions. By creating a form that points to another domain, and automatically submitting it, you can send a POST request to wherever you want [1].

POST requests can be easily sent cross-domain. NO ONE SHOULD EVER think that just because he's not using GET requests he's safe from CSRF attacks.

[1] See http://jsfiddle.net/8xnB3/5/ for example (which sent this comment).

EDIT: Just to clarify - I'm not saying that exposing those endspoints via GET is a good idea, I think its horrible. But people should be aware that avoiding GET does not protect against CSRF, and you still have to use CSRF tokens.

Re: Sails.js: Realtime MVC framework for Node.js

#46
post #31

Earlier quoted context omitted.

Oh really? As a non-Node.js guy, I would love to see some others. Can you show me some examples please? Thanks!

Node.js packages are usually small and self-contained. Without typing/APIs Node relies heavily on documentation, so packages which are not well-documented will fall into oblivion quickly. Who'd write a OSS library which nobody can use? My personal favorite, interactive docs! http://coffeescript.org/ I like these ones because of the straightforwardness: http://socket.io/ http://jade-lang.com/ http://mongoosejs.com/ An…

Mocha's docs are pretty awful, actually. If you don't know how to use it when you start, the docs are not going to help, much. They're mostly buzzwords and examples that show (in limited cases) "what", but not "why", and give you no purchase for answering questions about how to structure things.

Re: Sails.js: Realtime MVC framework for Node.js

#47
post #18

Judging from the description it does what the other 1000+ Node MVC frameworks do. What's the advantage of Sails over them? CRUD scaffolding is nothing new in Node's ecosystem. Apparently their edge is that users can manipulate the database on their own in the default scaffold? EDIT: Downvote without a comment is not constructive. This is a legitimate question. Care to explain?

I'm guessing the downvotes are for the snideness of your remark. A more respectable way to phrase your question would've been to simply ask how this framework compares to some of the other well known Node frameworks and why might I look into Sails to solve a specific problem instead of some of the others that are available.

Re: Sails.js: Realtime MVC framework for Node.js

#48
The whole point of Node/npm/Express (as a popular module) is its modularity. Node is not just about JS on the server, it reflects a paradigm shift -- a movement away from too much abstraction and magic back to lean and simple systems. And it's unbelievable fast.

Sorry to say but such frameworks and ideas are from the last decade (Rails was the main reason why I switched to Node).

Post reply on HN