Skip to content

[Bug] mkiocccentry(1) UUID type 4 is too strict #1035

@lcn2

Description

@lcn2

Is there an existing issue for this?

  • I have searched for existing issues and did not find anything like this

Describe the bug

The mkiocccentry(1) tool version: 1.0.8 2024-08-23, requires the UUID based username to be of this form:

xxxxxxxx-xxxx-4xxx-axxx-xxxxxxxxxxxx

A UUID type 4 can be anything of this form:

xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx

What you expect

The mkiocccentry(1) tool will allow any valid UUID type 4 for a username.

Environment

  • OS: yes
  • Device: of course
  • Compiler: good idea

bug_report.sh output

n/a

Anything else?

The ioccc_passwd.py, version "1.6.1 2024-12-07", in the submit-tool repo contains a work-a-round of the following form:

# The IOCCC mkiocccentry(1) tool, version: 1.0.8 2024-08-23,
# requires the UUID based username to be of this form:
#
#   xxxxxxxx-xxxx-4xxx-axxx-xxxxxxxxxxxx
#
# While str(uuid.uuid4()) does generate a '4' in the
# 14th character postion, the 19th position seems
# to be able to be any of [89ab].  We force the 19th
# character position to be an 'a' for now.
#
tmp = list(username)
# paranoia
tmp[14] = '4'
# mkiocccentry(1) tool, version: 1.0.8 2024-08-23 workaround
tmp[19] = 'a'
username = ''.join(tmp)

When this issue is resolved, the above work-a-round needs to be removed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtop priorityThis a top priory critical path issue for next milestone

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions