Hacker Newsnew | past | comments | ask | show | jobs | submit | missingencoding's commentslogin

Hey homakov, nice work. might want to remember to encodeURIComponent() around the keys as well:

     SecureLogin = function(scope){
       function toQuery(obj){
         return Object.keys(obj).reduce(function(a,k){a.push(k+'='+encodeURIComponent(obj[k]));return a},[]).join('&')


Thanks! internal toQuery works with predefined a-z keys only so I think it is ok to be this way?


better safe than sorry, as I'm sure you know ;)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: