contracting
contracting copied to clipboard
Contracts should be case locked.
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:
- Submit a contract as "testing"
- Submit another as "Testing"
- See both exists on BC.
Expected behavior contracts should be converted to upper and lower and compared for duplicate names.
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