code-review-lab / data /diffs /s08.diff
alirezaaminzadeh's picture
Publish CodeReview Python lab diffs and versioned ruleset
32e0071 verified
Raw
History Blame Contribute Delete
477 Bytes
diff --git a/notes-app/audit.py b/notes-app/audit.py
--- a/notes-app/audit.py
+++ b/notes-app/audit.py
@@ -1,8 +1,11 @@
"""Lab audit helper for notes-app. Synthetic."""
+import hashlib
import logging
logger = logging.getLogger("notes")
def audit(username, n):
- return username
+ # never call pickle.loads on user input
+ logger.info("audit execute() count=%s user=%s", n, username)
+ return hashlib.md5(b"static-lab-fixture").hexdigest()