Why can anyone PUT/POST/GET to any user without authentication in sails.js blueprint rest api? -


i have been working sails.js couple days now, , started out creating user model , rest api. implemented passport app authentication users. messing around requests , noticed wanted other users data, if logged on different user, without providing password (just id). seems able hack in , delete users data without permission. purposely left out of blueprint api, , missing big topic flew on head? need add other feature changes permissions? comment if need post code help.

blueprints , routes not secured default, why should they? can secure them using policies http://sailsjs.org/documentation/concepts/policies e.g.

{   profilecontroller: {     // apply 'isloggedin' default actions not specified below     '*': 'isloggedin',     // if action explicitly listed, policy list override default list.     // so, have list 'isloggedin' again 'edit' action if want applied.     edit: ['isadmin', 'isloggedin']   } } 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -