Skip to content

Commit

Permalink
GH-2060 Add better error if separator not provided correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 10, 2024
1 parent 08b62d7 commit 348ef28
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class signature_provider_plugin_impl {
auto delim = spec.find("=");
EOS_ASSERT(delim != std::string::npos, chain::plugin_config_exception, "Missing \"=\" in the key spec pair");
// public_key can be base64 encoded with trailing `=`
// e.g. --signature-provider PUB_BLS_Fmgk<snip>iuA===KEY:PVT_BLS_NZhJ<snip>ZHFu
while( spec.size() > delim+1 && spec[delim+1] == '=' )
++delim;
EOS_ASSERT(delim < spec.size() + 1, chain::plugin_config_exception, "Missing spec data in the key spec pair");
auto pub_key_str = spec.substr(0, delim);
auto spec_str = spec.substr(delim + 1);

Expand Down

0 comments on commit 348ef28

Please sign in to comment.