Skip to content

Commit

Permalink
Merge pull request #305 from fioprotocol/feature/EncryptKeyBug1-fioco…
Browse files Browse the repository at this point in the history
…ntracts-develop-06092023

bugfix-- use the correct payer account when verifying a request for obt.
  • Loading branch information
edrotthoff authored Jun 13, 2023
2 parents f9ddb3c + 5267f0e commit 1a408a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/fio.request.obt/fio.request.obt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,8 @@ namespace fioio {
fio_400_assert(fioreqctx_iter != trxtByRequestId.end(), "fio_request_id", fio_request_id,
"No such FIO Request", ErrorRequestContextNotFound);

string payer_account;
key_to_account(fioreqctx_iter->payer_key, payer_account);
name payer_acct = name(payer_account.c_str());
fio_403_assert(aactor == payer_acct, ErrorSignature);
//make sure payer of the request matches the actor.
fio_403_assert(aactor.value == fioreqctx_iter->payer_account, ErrorSignature);

fio_400_assert(fioreqctx_iter->fio_data_type == 0, "fio_request_id", fio_request_id,
"Only pending requests can be responded.", ErrorRequestStatusInvalid);
Expand Down

0 comments on commit 1a408a3

Please sign in to comment.