Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

In eosjsV21.0.3, eosioV2.0.7 when trying to create an account it is accepting "0287cha66yyr" and directly creating an account in its normalized form i.e. ".2..cha..yyr",created without any error. #795

Closed
AdB9 opened this issue Sep 9, 2020 · 1 comment

Comments

@AdB9
Copy link

AdB9 commented Sep 9, 2020

Version of EOSJS: 21.0.3
EOSIO version 2.0.7
Clear guidelines of eosio account naming states that "Each account is identified by a human readable name between 1 and 12 characters in length. The characters can include a-z, 1-5, and optional dots (.) except the last character."
But when trying to create an account with characters other than this, error should be thrown. But right now, it is automatically normalizing it and created an account with the normalized name without any warning or error thrown. This can be misleading as user might think the account has been created by the name he has passed.
This issue is inconsistent i.e. It throws error sometimes and sometimes it doesn't.

Expected behavior
Consistently error should be thrown for all unacceptable usernames

@bradlhart
Copy link
Contributor

I have just tested the name you mentioned 0287cha66yyr and I received the error: Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j, and only contain the following symbols .12345abcdefghijklmnopqrstuvwxyz which was added during #726 and #748.

Could you give more details on how you are arriving at this issue with eosjs? The regex added during those PRs should stop the code before it attempts any serialization.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants