Status: Unknown command line during OIDC flow
Concerned version
Version: 2.0.14
Summary
- Enable handler status
- Browse to an OIDC app, or any portal URL that contains a space, such as
- Non fatal, but puzzling status error line appears in Apache error logs
- Also, the request won't be counted
Logs
Status: Unknown command line -> dwho => /oauth2/authorize?client_id=test&scope=a b 24
Possible fixes
This is caused by the regexp in Status.pm
# Activity collect
if (
/^(\S+)\s+=>\s+(\S+)\s+(OK|REJECT|REDIRECT|LOGOUT|UNPROTECT|SKIP|EXPIRED|\-?\d+)$/
)
{
OIDC scopes can contain spaces
I think the best fix is to normalize the URL using URI->canonical before writing it to the status socket
Warning: status write are done in several places: Handler::Main, Portal::Main, etc.