Never depend on client side dates or any stuff which can be manipulated outside out control


Recently while doing a code review I came across a code which was using date functions in Action script (Adobe client side code) to print payment receipt date.
For persisting the payment date, it was being read from server -But for printing on receipt it was read from client machine.
I got an explanation that why to send a data which can be read same way on client (Referring to equivalent of getCurrentDate) -missing the point that we should never rely of stuff which can be manipulated outside out control.

Advertisements

About ChandanPandey

Try to come up with a good design as by product of good coding practices

Posted on May 5, 2013, in Others and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: