- Never trust the user!
- Validate all input coming from a user. This includes any part of an HTTP request that you're processing: the header names and values, the cookie names and values, the querysting parameters, web form values, and any other data included in the message body.
- Always use whilelist input validation to test input; that is, test whether an input does match an expected good format and reject it if it doesn't. Avoid blacklist input validation; that is, testing whether an input matches an expected bad format and rejecting it if it does.
- Never perform validation just on client side - an attacker can easily bypass these controls. Always validate on the server side.
- Use regular expressions for more complicated validation logic like testing e-mail addresses. Unless you're a regex expert, also consider using regex from one of the public databases such as regexlib.com or a commercial regex development tool such as Regex Buddy.
- If you can afford the performance hit, validate input both as it comes into your application and again immediately before you use it. But if you can only do it one place. do it immediately before use.
It seems Google makes a new mistake by launching its new security key (2-step verification) one of the steps is USB device . The question :how come can i plug USB into my mobile (I-Phone , I-Pad , Samsung Galaxy , ....) ! Do Google know the difficulties while you are holding a USB on your hand all the time . so You can't access your account if it's not in your hands. or it's damaged ? This solution is hopeless , I think it's designed for small audience. As someone says : Can you convince the Bank Manager while you are putting the USB Device into the bank PC, that you are securing your PC , not stealing the bank data, or not transferring amounts of money to other account . or what else . You know , This way is not quietly good , If I have many accounts on Google and other websites ,I need many USB devices to verify myself. That's of course , not good at all.
Comments
Post a Comment