Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
NodeJS - Iterate Object
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="M8than" data-source="post: 438621" data-attributes="member: 14117"><p>I'm not entirely sure on expressJS, but I'm pretty sure setting a cookie for every parameter in that object is extremely bad security practice as you are literally setting them all as plain text cookies stored in the users browser. Use the session class. Please.</p><p>[doublepost=1536253603,1536253468][/doublepost]</p><p>Alternatively instead of destructuring the body object and appending it directly to the array could you not set req.session.user to your user object?</p></blockquote><p></p>
[QUOTE="M8than, post: 438621, member: 14117"] I'm not entirely sure on expressJS, but I'm pretty sure setting a cookie for every parameter in that object is extremely bad security practice as you are literally setting them all as plain text cookies stored in the users browser. Use the session class. Please. [doublepost=1536253603,1536253468][/doublepost] Alternatively instead of destructuring the body object and appending it directly to the array could you not set req.session.user to your user object? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
NodeJS - Iterate Object
Top