When access key contains ':', e.g. `some_info:for_user',
authorization header looks like:
"AWS some_info:for_user:request_signature"
so `auth_str.find(':')` result in auth_id = "some_info",
auth_sign = "for_user:request_signature".
auth_str.rfind(':') solves this issue.
Signed-off-by: Roman Haritonov <reclosedev@gmail.com>
if (strncmp(s->http_auth, "AWS ", 4))
return -EINVAL;
string auth_str(s->http_auth + 4);
- int pos = auth_str.find(':');
+ int pos = auth_str.rfind(':');
if (pos < 0)
return -EINVAL;