CS FundamentalsHardProduct-company security interview
A team builds a hiring form. QA notices the form can be submitted with all fields blank; developers say 'validation is the back-end's job', back-end developers say 'the form should prevent it'. Which principle settles this most robustly?
- A. Validate only on the client because it is faster
- B. Validate only in the database
- C. Never validate input
- D. Validate on the server as the authoritative check, since client-side checks can be bypassed; client-side validation is only a usability aid
Correct answer: D. Validate on the server as the authoritative check, since client-side checks can be bypassed; client-side validation is only a usability aid
Anything sent by a client can be forged, so security and integrity checks must live on the server. Client checks add fast feedback but are not a control.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A client can fund only 120 person-months. Using basic COCOMO for a semi-detached project (Effort = 3.0 x KLOC^1.12), what is the largest…
- For the function below, what is its cyclomatic complexity, and how many times is a[i] + a[j] == target evaluated for findpair([1, 2, 3, 4…
- For the same findpair function (two nested for loops, an if that returns (i, j) when a pair matches, and return None after the loops)…
- A Value Object is modelled as a frozen dataclass. What does this print? python from dataclasses import dataclass, FrozenInstanceError…
- This Singleton caches its instance in new. What does it print? python class Settings: instance = None def new(cls, args): if cls.instance…
- Module report.py does from pricing import getrate and calls getrate() inside build(). A unit test for build() uses…