Jean Paul Galea
ca5e787452
Refactor.
2015-07-21 21:38:37 +00:00
Jean Paul Galea
3572410b30
Better grouping.
...
- 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.
2015-07-21 21:27:33 +00:00
Jean Paul Galea
1e799aa6e5
Better grouping.
...
- 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.
2015-07-21 21:17:59 +00:00
Jean Paul Galea
1e4453ccdf
Refactor and unset after use.
2015-07-21 21:12:21 +00:00
Jean Paul Galea
82d5796245
Refactor.
2015-07-21 21:09:17 +00:00
Jean Paul Galea
262671f50b
Refactor.
...
- single quotes.
- unset after use.
- don't wrap.
2015-07-21 21:05:16 +00:00
Jean Paul Galea
847f288cf5
Refactor.
2015-07-21 21:03:03 +00:00
Jean Paul Galea
11c160b05c
Cosmetic changes.
2015-07-21 21:02:50 +00:00
Jean Paul Galea
e5238b8f54
Refactor.
...
- only add nonce to $extra array after check.
2015-07-21 20:56:02 +00:00
Jean Paul Galea
e24b02a7dc
Refactor.
...
- $new_otp not used afterwards,
clean up to avoid reuse by mistake.
2015-07-21 20:54:49 +00:00
Jean Paul Galea
84e867a6eb
Better grouping.
...
- no functional affect whatsoever.
2015-07-21 20:53:13 +00:00
Jean Paul Galea
0749db6e8f
More robust https check.
2015-07-21 20:49:17 +00:00
Jean Paul Galea
c5983f13eb
Refactor.
2015-07-21 20:45:57 +00:00
Jean Paul Galea
06d037ef09
Refactor.
2015-07-21 20:44:53 +00:00
Jean Paul Galea
937dd1a674
Refactor.
...
- avoid using $_SERVER vars in "core",
helps when debugging or running via cli.
2015-07-21 20:38:57 +00:00
Jean Paul Galea
2aa06ec0a3
Refactor sign function.
...
- this commit might affect LOG_DEBUG message,
since now we log utf8_encode($qs) not $qs.
- this is probably what we want though,
since we run hash_hmac on the latter.
2015-07-21 20:36:56 +00:00
Jean Paul Galea
3414c15eb4
Unwrap else block.
...
- sendResp calls exit()
2015-07-21 20:26:55 +00:00
Jean Paul Galea
1ca175ef2e
More minor fixes.
2015-07-21 20:26:37 +00:00
Jean Paul Galea
116d992da2
Refactor.
...
- $apiKey is initiliased further down.
2015-07-21 20:13:17 +00:00
Jean Paul Galea
b24eabeac4
Refactor.
...
- str substitution rather than concat.
- cosmetic changes.
2015-07-21 20:12:05 +00:00
Jean Paul Galea
7686afc4a7
double -> single quotes.
2015-07-21 20:01:24 +00:00
Jean Paul Galea
b417759932
Update copyright year.
2015-07-20 20:01:16 +00:00
Jean Paul Galea
c0048ce7cc
Add FIXME markers.
2015-07-20 19:56:43 +00:00
Jean Paul Galea
5ed2f1d4d5
Refactor.
...
- negate test and return early.
- avoid wrapping whole function in `if () { }`.
- move $condition below $arr,
since $arr is passwed first, then $condition, to conditionalUpdateBy().
2015-07-20 19:53:45 +00:00
Jean Paul Galea
3097d13629
Refactor.
2015-07-20 19:44:56 +00:00
Jean Paul Galea
c52300ab39
Improve documentation.
2015-07-20 19:39:59 +00:00
Jean Paul Galea
4ca6fb5448
Refactor database configuration.
...
- don't repeat config-db.php file path
- add @is_readable,
we might not have the proper permissions.
- use 'require_once' instead of 'include',
this file should only be included once and we
should fail dramatically if we can't load it.
- better documentation.
2015-07-20 19:20:04 +00:00
Jean Paul Galea
7e76f9bff8
Cosmetic changes.
...
\# -> //
2015-07-20 19:09:38 +00:00
Jean Paul Galea
1dab5c64aa
Cosmetic changes.
2015-07-20 19:04:57 +00:00
Jean Paul Galea
f9fd53046a
Move comment where applicable.
2015-07-20 19:04:36 +00:00
Jean Paul Galea
f99776b700
Cosmetic changes.
2015-07-20 18:59:16 +00:00
Jean Paul Galea
be529e2224
Remove unused variables.
...
- will add db host/port later, currently they are ignored even if configured.
2015-07-20 18:58:03 +00:00
Jean Paul Galea
5766518b93
Use TLS for man page www.yubico.com links.
2015-07-20 18:55:46 +00:00
Jean Paul Galea
182b6f326b
Use TLS in ykval-config.php examples
2015-07-20 18:51:40 +00:00
Jean Paul Galea
16d8dfe6ac
Refactor counter logic.
...
- break up into multiple if comparisons.
2015-07-18 00:46:17 +02:00
Jean Paul Galea
6038c17025
Single quotes.
2015-07-18 00:37:21 +02:00
Jean Paul Galea
b4b44c4d04
Added helper comments.
2015-07-18 00:34:42 +02:00
Jean Paul Galea
7689fe4ba1
Cosmetic changes.
...
- method grouping.
2015-07-18 00:30:31 +02:00
Jean Paul Galea
0e6fe1e1e8
Change scope on private methods.
...
- mainly to help refactor,
and avoid grep'ing globally.
2015-07-18 00:26:24 +02:00
Jean Paul Galea
c94f0d03a1
Refactor.
...
- getClientData() returns array or bool false on failure.
2015-07-18 00:19:04 +02:00
Jean Paul Galea
635981f3d3
Set scopes on methods.
...
- confirmed to be used publically.
2015-07-18 00:16:03 +02:00
Jean Paul Galea
ef8a8640c7
FIXME markers.
2015-07-18 00:09:19 +02:00
Jean Paul Galea
db0f55b818
Fix.
...
- fix bug introduced in a28ad6df69
.
2015-07-18 00:07:22 +02:00
Jean Paul Galea
b3c5ecc724
Refactor.
...
- use single quotes where possible.
2015-07-18 00:05:32 +02:00
Jean Paul Galea
39ce50b772
Cosmetic changes.
2015-07-17 23:59:26 +02:00
Jean Paul Galea
23474aec31
Cosmetic changes.
2015-07-17 23:55:44 +02:00
Jean Paul Galea
ba160c9976
FIXME marker.
...
- probably should be '&local_counter' not ',local_counter'.
- check later as this is written to db and if we fix here,
we might break other stuff.
2015-07-17 23:48:56 +02:00
Jean Paul Galea
47422f9c70
Cosmetic changes.
2015-07-17 23:46:54 +02:00
Jean Paul Galea
c865edcc15
Cosmetic changes.
2015-07-17 23:41:44 +02:00
Jean Paul Galea
645c5c5467
Fix bug.
...
- this was not introduced by my refactoring.
- LOG_ALERT message was incorrect,
probably yy,p from counter block.
2015-07-17 23:38:17 +02:00