Set a maximum length and character set for role identifiers

Open Beginner friendly
#351 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
84/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
json, markdown

Research direction

Read README.md under “Application-Specific Roles” and compare its role identifier rules with the limits described for client/hello supported_roles and server/activate active_roles. Update the requirement for all versioned role identifiers to the proposed 64-byte visible ASCII set, excluding " and \; done when the documentation clearly states the cap and character set and notes that defined roles comply.

Written by the indexing model from the issue text.

Description

Role identifiers have no length or character limit. README.md "Application-Specific Roles" only requires the leading _ and an explicit version, and the only bound on a name in client/hello supported_roles is the hello's overall 16384 bytes. server/activate active_roles has no bound at all. A client that wants to recognize its own application role in active_roles, or a server that stores the roles a client advertised, has to plan for names of any length. Since each support object's key is the identifier plus _support, those keys are unbounded too.

Suggested fix: In README.md "Application-Specific Roles", require every versioned role identifier, defined or application-specific, to be at most 64 bytes of visible ASCII other than " and \ (0x21-0x7E without 0x22 and 0x5C). 64 matches the other identifier caps. The character set keeps an identifier and its <role>_support key free of JSON escaping. The defined roles already fit.

sendspin-cpp already applies this limit to the application roles it advertises (https://github.com/Sendspin/sendspin-cpp/pull/218).

Related:

Dominant language
Python
Stars
135
Forks
11
Avg merge
2d 14h
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Sendspin/spec

All issues in Sendspin/spec

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.