- use hostname (+ port if any) for graph name.
i.e. if we have a sync URL:
https://api.yubico.com:8080/wsapi/2.0/sync
instead of having "api" as name,
we have "api.yubico.com:8080".
- also avoid using regex and use parse_url() from php core instead.
- plugin assumed URL uses a hostname (no static ips)
and that hostname resolves to both ipv4 and ipv6.
- if we want to differentiate stats between ipv4 and ipv6,
we need to re-think this and do it in a smart way.
- for now we prefer to allow cURL to pick whatever IP it resolves,
and run the latency test on that.
- signed off by Klas Lindfors.
- use PATH_SEPARATOR everywhere,
instead of a mix of PATH_SEPARATOR and hard coded colons.
- always include /usr/share/yubikey-val first,
then /etc/yubico/val.
- should not have any visible affects,
since no file names are common between the two directories.
- use array+implode to make it easier to add/remove paths,
and to avoid hardcoded the path separator.
- don't depend on external binaries,
it assumes too much and is dangerous.
- we can depend on libcurl instead,
since it's already a dependency in core.
- we should do this for other plugins too,
and move the new function into ykval-common.php
- plugin reports same exact values as before.
- reSync() is only called in ykval-queue,
and that sets an $older_than argument.
- additionally, the defaults did not match.
- the value in ykval-queue (via ykval-config) is 10 seconds,
and the value in reSync($older_than=) was 60 seconds.
- no functional change, just makes things less confusing.
- strftime -> date.
- strftime is same as date, but with locales.
- date format doesn't output names (January, March, etc.),
so locale doesn't matter.
- also, would we really want locale in logs?
- Log::log() internally support array implode,
so no need to duplicate functionality.
- however, the internal implode uses two consecutive spaces as separator,
so this will change the log format slightly.
e.g. "delta=x now=y" becomes "delta=x now=y"
- same as 1e799aa6e5.
- group $timeout filtering and validation.
- this commit might change replies sent to clients,
since the validation check is done eaerlier now,
and we might return S_MISSING_PARAM before S_BAD_OTP for example.
- this should really not cause any issues though,
the order of which error is raised first should not matter to clients.
- group $sl filtering and validation.
- this commit might change replies sent to clients,
since the validation check is done eaerlier now,
and we might return S_MISSING_PARAM before S_BAD_OTP for example.
- this should really not cause any issues though,
the order of which error is raised first should not matter to clients.