Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grade-school: Change a UUID to be version 4 #1760

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
grade-school: Change a UUID to be version 4
Commit 03529d0 (#1735) added a new test case for the `grade-school`
exercise, but the UUID added was version 1 rather than version 4. This
was not caught by CI because the regex in the schema validator was
too permissive (fixed by #1759).

Some reasons to prefer version 4 UUIDs:
- Version 4 is the right version for a fully random and unique
  identifer; we don't want to indicate anything about the machine that
  generated the UUID, and version 1 UUIDs have a timestamp and MAC
  address component.
- All of the other UUIDs currently in `problem-specifications` are valid
  version 4 UUIDs.
- `configlet uuid` generates a version 4 UUID.
- A reader familiar with the UUID specification (RFC 4122) might see a
  version 1 UUID and infer that the timestamp or MAC address component
  is useful, causing them to wonder why the others are version 4.
- A user who generates a version 1 UUID might unintentionally leak their
  MAC address.

See also:
- https://tools.ietf.org/html/rfc4122.html
  • Loading branch information
ee7 committed Dec 27, 2020
commit 79435f9a93d91b3aa9d478544fe60f368ad3fbc3
2 changes: 1 addition & 1 deletion exercises/grade-school/canonical-data.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
"expected": ["Aimee"]
},
{
"uuid": "dece43c8-3ba5-11eb-8fdf-7f8daeaeb5f2",
"uuid": "c125dab7-2a53-492f-a99a-56ad511940d8",
"description": "A student can't be in two different grades",
"property": "roster",
"input": {