ਇਨਪੁੱਟ ਵੈਲੀਡੇਸ਼ਨ — ਉਪਭੋਗਤਾ ਇਨਪੁੱਟ ਦੀ ਜਾਂਚ ਕਰਨਾ ਕਿ ਇਹ ਸੰਭਾਲਣ ਤੋਂ ਪਹਿਲਾ ਅਨੁਮਾਨਿਤ ਮਾਪਦੰਡ ਪੂਰੇ ਕਰੇ — ਇੱਕ ਬੁਨਿਆਦੀ ਸੁਰੱਖਿਆ ਅਭਿਆਸ ਹੈ। ਕਿਉਂਕਿ ਹਮਲੇ ਅਕਸਰ ਖਤਰਨਾਕ ਇਨਪੁੱਟ ਦੁਆਰਾ ਆਉਂਦੇ ਹਨ، ਇਨਪੁੱਟ ਦੀ ਜਾਂਚ (ਅਤੇ ਸਾਫ਼ ਕਰਨੀ) ਬਹੁਤ ਸਾਰੀਆਂ ਕਮਜ਼ੋਰੀਆਂ ਨੂੰ ਰੋਕਣ ਵਿੱਚ ਮਦਦ ਕਰਦੀ ਹੈ। ਇੱਕ ਮੂਲ ਸਿਧਾਂਤ: ਹਮੇਸ਼ਾ ਉਪਭੋਗਤਾ ਇਨਪੁੱਟ ਦੇ ਬਾਰੇ ਸ਼ੱਕ ਕਰੋ।
ਹਮੇਸ਼ਾ ਉਪਭੋਗਤਾ ਇਨਪੁੱਟ ਦੇ ਬਾਰੇ ਸ਼ੱਕ ਕਰੋ
ALL input from outside (users, APIs, files, requests) is UNTRUSTED — it can be malicious:
→ attackers send crafted input to exploit vulnerabilities (injection, XSS, etc.)
→ "never trust the client" — input can be anything, including attacks
→ Validate and handle ALL external input as potentially hostile.
