SarkariResultess QA Bank

XSS से बचने की basic practice क्या है? को secure तरीके से कैसे implement करें?

Other 0 Views Verified
XSS से बचने की basic practice क्या है? को secure तरीके से कैसे implement करें? सही विकल्प चुनें और code/solution को समझें।
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

हर input पर केवल trim()

हर input पर केवल trim()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified

हर input को md5()

हर input को md5()
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।
Verified Correct Answer

Context-appropriate output escaping जैसे htmlspecialchars() उपयोग करना

Context-appropriate output escaping जैसे htmlspecialchars() उपयोग करना
Additional Explanation
XSS prevention में context-aware output encoding महत्वपूर्ण है। User input को trust न करें; validation, escaping और prepared statements context के अनुसार उपयोग करें।
Verified

HTML escaping कभी न करना

HTML escaping कभी न करना
Additional Explanation
यह विकल्प सही Core PHP solution नहीं है।