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

Remove dependency on node-stringprep #16

Closed
maurelian opened this issue Jan 4, 2017 · 1 comment
Closed

Remove dependency on node-stringprep #16

maurelian opened this issue Jan 4, 2017 · 1 comment
Labels

Comments

@maurelian
Copy link
Owner

It has a lot of build issues: xmppo/node-stringprep#94

@maurelian
Copy link
Owner Author

After discussion with @Arachnid based on the following research, we've decided to keep current dependency until it actually causes an issue that forces us to invest the effort required to replaces this.

Nameprep search

Issue

Cannot find a maintained implementation of name prep for the registrar package

Options

1. Use existing libraries:

Search terms used include: stringprep, nameprep, IDN, IDNA, IETF, RFC

2. Reimplement Nameprep

Tables from stringprep

  • Repertoire: Unicode3.2
  • Mapping: Tables B.1, B.2
  • Normalize: Unicode normalization form KC
  • Prohibit: Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9
  • Check (bidi):This profile specifies checking bidirectional strings as described in
    STRINGPREP section 6

Background:

Stringprep

  • Preparing Unicode text strings in order to increase the likelihood that string input and string comparison work in ways that make sense for typical users throughout the world
  • Preparation steps:
    • Mapping
    • Normalize
    • Prohibit
    • Check (bidi) Check for bidirectional characters

Nameprep
is the process of case-folding to lowercase and removal of some generally invisible code points before it is suitable to represent a domain name, or other such canonical name. It is used by IDNA, using the Unicode standard for NFKC normalization.

NFKC:
Normalization Form Compatibility Composition Characters are decomposed by compatibility, then recomposed by canonical equivalence.

Internationalized domain names in applications:
An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in software applications, in whole or in part, in a language-specific script or alphabet, such as Arabic, Chinese, Cyrillic, Tamil, Hebrew or the Latin alphabet-based characters with diacritics or ligatures, such as French. These writing systems are encoded by computers in multi-byte Unicode. Internationalized domain names are stored in the Domain Name System as ASCII strings using Punyc¥ode transcription.

Refs:

Arachnid pushed a commit to Arachnid/eth-registrar-ens that referenced this issue May 12, 2017
* Use random secret for bid

* Flatten bid object

Or else it can get confusing if you should use bid (the mongo object) or bid.bid (the object generated by registrar.bidFactory). Also, remove duplicate properties.

* Stronger secret value

* change bid placement

* fixes download button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant