Skip to content

Commit

Permalink
ATTRIB checks, INDY-71 (hyperledger#163)
Browse files Browse the repository at this point in the history
* Enable ATTRIB with "endpoint:None"

* Remove ATTRIB checks

The checks were moved to the validation logic

* bump sovrin-common-dev==0.2.76
  • Loading branch information
AlexanderShekhovcov authored and ashcherbakov committed Jun 1, 2017
1 parent c82c4e4 commit 85c11f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run(self):
data_files=[(
(BASE_DIR, ['data/nssm_original.exe'])
)],
install_requires=['sovrin-common-dev==0.2.75', 'python-dateutil'],
install_requires=['sovrin-common-dev==0.2.76', 'python-dateutil'],
setup_requires=['pytest-runner'],
tests_require=['pytest', 'sovrin-client-dev==0.3.116'],
scripts=['scripts/start_sovrin_node',
Expand Down
12 changes: 0 additions & 12 deletions sovrin_node/server/domain_req_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ def _doStaticValidationAttrib(self, identifier, reqId, operation):
'{} should have one and only one of '
'{}, {}, {}'
.format(ATTRIB, RAW, ENC, HASH))
if RAW in operation:
try:
data = json.loads(operation[RAW])
# QUESTION: This does not fit here, this should be the
# client's responsibility to check.
endpoint = data.get(ENDPOINT, {}).get('ha')
check_endpoint_valid(endpoint, required=False)

except EndpointException as exc:
raise InvalidClientRequest(identifier, reqId, str(exc))
except BaseException as exc:
raise InvalidClientRequest(identifier, reqId, str(exc))

# TODO: This is not static validation as it involves state
if not (not operation.get(TARGET_NYM) or
Expand Down

0 comments on commit 85c11f2

Please sign in to comment.