Skip to content

Commit fb0224c

Browse files
committed
address Rita's review on Chapter 13
1 parent 6f3c4cb commit fb0224c

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

chapter_13_database_layer_validation.asciidoc

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
[[chapter_13_database_layer_validation]]
22
== Validation at the Database Layer
33

4-
// RITA: Update the warning since you have reviewed the chapter text in detail?
5-
.🚧 Warning, Chapter update in progress
6-
*******************************************************************************
7-
This chapter is currently in the process of being rewritten for the 3e.
8-
9-
The code listings should all be valid,
10-
and work with Python3.12 + Django 4,
11-
but I haven't reviewed the chapter text in detail yet.
12-
13-
*******************************************************************************
144

155
((("user interactions", "validating inputs at database layer", id="UIdblayer13")))
166
((("database testing", "database-layer validation", id="DBTdblayer13")))
@@ -263,18 +253,20 @@ been passed an error variable, and if so, we do this:
263253
((("form control classes (Bootstrap)")))
264254
Take a look at the https://getbootstrap.com/docs/5.3/forms/validation/#server-side[Bootstrap docs] for more
265255
info on form controls.
266-
footnote:[... and ignore their advice to prefer client-side validation.
267-
Ideally, having both server- and client-side validation is the best.
268-
If you can't do both, then server-side validation is the one you really can't do
269-
without.
270-
Check the
271-
https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-en/02-checklist/05-checklist.html[OWASP checklist],
272-
if you are not convinced yet.
273-
Client-side validation will provide faster feedback on the UI, but
274-
https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html#client-side-vs-server-side-validation[it is not a security measure.]
275-
Server-side validation is indispensable for handling any input
276-
that gets processed by the server--and it will also provide albeit slower,
277-
feedback for the client side.]
256+
257+
TIP: However, ignore the Bootstrap docs' advice to prefer client-side
258+
validation.
259+
Ideally, having both server- and client-side validation is the best.
260+
If you can't do both, then server-side validation is the one you really
261+
can't do without.
262+
Check the
263+
https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/stable-en/02-checklist/05-checklist.html[OWASP checklist],
264+
if you are not convinced yet.
265+
Client-side validation will provide faster feedback on the UI, but
266+
https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html#client-side-vs-server-side-validation[it is not a security measure.]
267+
Server-side validation is indispensable for handling any input
268+
that gets processed by the server--and it will also provide albeit slower,
269+
feedback for the client side.]
278270

279271

280272
// CSANAD: these are the new docs for Bootstrap, but for some reason they begin
@@ -1089,13 +1081,14 @@ $ pass:quotes[*python src/manage.py test functional_tests*]
10891081
OK
10901082
----
10911083
// RITA: Perhaps add a few words after "Excellent" to explain what you're doing?
1092-
Excellent:
1084+
Excellent! Let's commit our progress:
10931085

10941086
[subs="specialcharacters,quotes"]
10951087
----
10961088
$ *git commit -am "Refactor hard-coded URLs out of templates"*
10971089
----
10981090
// RITA: Please add a sentence to give the figure context. "Let's remove the item from our scratchpad."
1091+
And don't forget to cross off the "Remove hardcoded URL..." task as well:
10991092
[role="scratchpad"]
11001093
*****
11011094
* 'Remove hardcoded URLs from views.py'

0 commit comments

Comments
 (0)