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

Prohibit Usage of Character _ in Unique Network Identifiers #670

Open
6 tasks
kmlbgn opened this issue May 23, 2024 · 1 comment
Open
6 tasks

Prohibit Usage of Character _ in Unique Network Identifiers #670

kmlbgn opened this issue May 23, 2024 · 1 comment
Assignees
Labels
invalid This doesn't seem right Priority: High x/gov Governance module x/layer2 x/spending Spending pool module x/tokens Tokens module

Comments

@kmlbgn
Copy link
Collaborator

kmlbgn commented May 23, 2024

Description

In the context of the network, many identifiers are unique and used extensively. For the purpose of maintaining the security of these unique identifiers, especially in relation to the utilization of prefixes, it is recommended that the usage of the character _ be prohibited for all users.

  • Identity Registrar :

    func ValidateIdentityRecordKey(key string) bool {
    regex := regexp.MustCompile(`^[a-zA-Z][_0-9a-zA-Z]*$`)
    return regex.MatchString(key)
    }

  • SID roles:

    func ValidateRoleSidKey(key string) bool {
    regex := regexp.MustCompile(`^[a-zA-Z][_0-9a-zA-Z]*$`)
    return regex.MatchString(key)
    }

  • Spending Pool :

    func ValidateSpendingPoolName(name string) bool {
    regex := regexp.MustCompile(`^[a-zA-Z][_0-9a-zA-Z]*$`)
    return regex.MatchString(name)
    }

  • Missing ValidateDappName for dApp names

  • Unique identifiers should not be purely numerical. While they can include numbers, they must contain at least one non-numerical character.

  • Missing ValidateTokenDenom for token denom when adding token rate & token alias (Token module) and minting module (Layer 2 module). But this issue should be in consideration of potential merging of minting module with token module Migrate Minting module from Layer 2 module to Token Module and Refactor Token Module Structure #664

@kmlbgn kmlbgn added the DRAFT Issue being drafted label May 23, 2024
@kmlbgn kmlbgn added x/gov Governance module x/spending Spending pool module x/tokens Tokens module x/layer2 invalid This doesn't seem right Priority: High and removed DRAFT Issue being drafted labels May 27, 2024
@kmlbgn
Copy link
Collaborator Author

kmlbgn commented Jul 3, 2024

@jgo121
After reviewing the ABR specification, it should be added here that unique identifiers should not be purely numerical. While they can include numbers, they must contain at least one non-numerical character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right Priority: High x/gov Governance module x/layer2 x/spending Spending pool module x/tokens Tokens module
Projects
None yet
Development

No branches or pull requests

2 participants