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

Contracts should be case locked. #274

Open
JeffWScott opened this issue Jan 2, 2020 · 1 comment
Open

Contracts should be case locked. #274

JeffWScott opened this issue Jan 2, 2020 · 1 comment

Comments

@JeffWScott
Copy link
Contributor

Describe the bug
Contracts are not case locked, so "currency" and "Currency" would be stored as two different contracts. That's a security risk.

To Reproduce
Steps to reproduce the behavior:

  1. Submit a contract as "testing"
  2. Submit another as "Testing"
  3. See both exists on BC.

Expected behavior
contracts should be converted to upper and lower and compared for duplicate names.

@StuartFarmer
Copy link
Contributor

Calling str.lower will fix this. We can also restrict the names to be ASCII only, a certain length, and prepend a prefix to prevent collisions with Python keywords.

While -> while -> c_while # Add c_ prefix?
123hElLo -> should fail
Hi^^^%%@@ -> should fail

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

No branches or pull requests

2 participants