Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Modern Application Development II
Web security, auth & CORS
Official Paper
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 31 Aug 2025 (FN)End Term
- Q1MCQ2 Marks·Choose one option
What is the primary purpose of CORS (Cross-Origin Resource Sharing)?
- ATo encrypt data between client and server
- BTo control which domains can access resources
- CTo compress HTTP responses
- DTo authenticate users across applications
- Q2MSQ2 Marks·Choose all correct options
Which of the following practices help protect against supply chain attacks?
- AVersion pinning
- BStoring keys only in environment variables
- CReduce Dependencies
- DUsing only packages with over 1000 stars on GitHub
Read the passage below, then answer Q3–Q4
Answer the given subquestions.
Q3MCQ3 Marks·Choose one option
- AThe password will be stored as plain text "mypassword123" in the database because WTF_CSRF_ENABLED = False
- BThe password will be hashed using bcrypt with the salt "this-is-a-salt-key" before being stored in the database
- CThe password will be hashed using SHA-256 algorithm since no specific hashing method is configured
- DThe password will be encrypted using the SECRET_KEY and stored in the session only
- Q4MCQ4.5 Marks·Choose one option

- A200, 200, 200
- B200, 401, 403
- C200, 401, 401
- D401, 401, 403
End Term · 31 Aug 2025 (AN)End Term
- Q5MCQ2 Marks·Choose one option
What is the primary purpose of CORS (Cross-Origin Resource Sharing)?
- ATo encrypt data between client and server
- BTo compress HTTP responses
- CTo authenticate users across applications
- DTo control which domains can access resources
- Q6MSQ2 Marks·Choose all correct options
Which of the following practices help protect against supply chain attacks?
- AStoring keys only in environment variables
- BVersion pinning
- CUsing only packages with over 1000 stars on GitHub
- DReduce Dependencies
- Q7MCQ4.5 Marks·Choose one option

- ARequest succeeds
- BCORS error occurs
- C404 error
- DThe server crashes
End Term · 22 Dec 2024 (FN)End Term
- Q8MCQ3 Marks·Choose one option

- Asecure=True and samesite='Strict'
- Bsecure=False and samesite='Strict'
- Csecure=True and samesite='None'
- Dsecure=False and samesite='Lax'
- Q9MCQ3 Marks·Choose one option

- ANo authentication check
- BSQL injection vulnerability
- CUnvalidated user input
- DAll of these
- Q10MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
End Term · 22 Dec 2024 (AN)End Term
- Q11MCQ3 Marks·Choose one option

- Asecure=False and samesite='Strict'
- Bsecure=True and samesite='None'
- Csecure=True and samesite='Strict'
- Dsecure=False and samesite='Lax'
- Q12MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A