Skip to content

Commit

Permalink
Revert "fix: 400 for invalid end role signatures (#344)"
Browse files Browse the repository at this point in the history
This reverts commit f4a1032.
  • Loading branch information
kentbull authored Jan 10, 2025
1 parent f4a1032 commit 0baa5a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/keria/app/aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,8 +1330,8 @@ def on_post(req, rep, name, aid=None, role=None):
)
try:
agent.hby.rvy.processReply(rserder, tsgs=[tsg])
except (kering.UnverifiedReplyError, kering.ValidationError):
raise falcon.HTTPBadRequest(description="unable to verify end role reply message")
except kering.UnverifiedReplyError:
pass

oid = ".".join([pre, role, eid])
op = agent.monitor.submit(
Expand Down
11 changes: 0 additions & 11 deletions tests/app/test_aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1373,16 +1373,6 @@ def test_oobi_ends(helpers):
assert res.json == {'oobis': [], 'role': 'agent'}

rpy = helpers.endrole(iserder.pre, agent.agentHab.pre)

# first try with bad signatures
sigs = helpers.sign(b'0123456789xyzxyz', 0, 0, rpy.raw)
body = dict(rpy=rpy.ked, sigs=sigs)
res = client.simulate_post(path=f"/identifiers/pal/endroles", json=body)
assert res.status_code == 400
assert res.json == {'description': "unable to verify end role reply message",
'title': '400 Bad Request'}

# now with correct
sigs = helpers.sign(salt, 0, 0, rpy.raw)
body = dict(rpy=rpy.ked, sigs=sigs)

Expand All @@ -1399,7 +1389,6 @@ def test_oobi_ends(helpers):
res = client.simulate_post(path=f"/endroles/pal", json=body)
assert res.status_code == 404


# must be a valid aid alias
res = client.simulate_get("/identifiers/bad/oobis")
assert res.status_code == 404
Expand Down

0 comments on commit 0baa5a8

Please sign in to comment.