Commit graph

111 commits

Author SHA1 Message Date
HB9HIL
afeca7385e
new redis2 session driver
In ancient times redis wasn't able to tell the client that a lock was released so the origin
CI3 redis driver had to poll with sleep(1) to wait for the lock to be released. This produced
a staircase of 1s/2s/3s delays for parallel AJAX requests of the same user. While I reduced this
polling to 100ms, it still slows down the user experience. This new redis2 driver uses BLPOP to
wait for the lock to be released, so serialized AJAX requests of the same user are no longer delayed.
All modern redis or valkey servers support BLPOP, so this driver should be used instead of the
original redis driver.
2026-08-12 15:15:01 +02:00
phl0
8a2d354cd8
Fix English wording 2026-08-11 14:29:17 +02:00
HB9HIL
1cfaddf8c5
added api_v2_ comment for rate limit 2026-07-20 07:37:27 +02:00
HB9HIL
c63f2f6198
not longer supported by 3rd party software
wavelog support was removed in trxd for whatever reason
2026-06-09 23:04:48 +02:00
HB9HIL
a2ba92cc55
remove unused hook config
We can remove this config since we override to true anyway in order to
make gettext work
2026-06-06 01:19:55 +02:00
Ronald de Heer
030004790e Switch to Personal Access Token (PAT) auth
Replaces the callsign+password → JWT flow with a single long-lived
Personal Access Token (pat_*), matching the GitHub/Stripe pattern.

User flow now:
  • Sign up on qrzcall.eu (Data or Extra subscription required)
  • Account → API Tokens → "Generate new token", label it
    (e.g. "Wavelog at home"), copy the pat_… string
  • Paste into Wavelog's "QRZCALL.EU API Token" config field

Why this is better than the previous credentials flow:
  • The user's QRZCALL.EU password never leaves the SPA
  • Each Wavelog install gets its own revocable token
  • A leaked Wavelog config exposes a single revocable token,
    not the password the user might reuse elsewhere
  • The library is simpler: no session cache, no retry-on-expiry,
    no /portable-aware re-auth dance — just Bearer on every call

Code changes:
  • application/libraries/Qrzcall.php  - drops session() and
    set_session(), keeps search() and sourcename(). ~30 LOC shorter.
  • application/libraries/Callbook.php - QRZCALL_SESSION_DURATION
    constant and qrzcall_session_cachekey property removed.
    _qrzcall() collapses from ~40 to ~20 LOC.
  • application/config/config.sample.php - qrzcall_username and
    qrzcall_password replaced with a single qrzcall_token.
  • install/config/config.php - same in the wizard's template.
  • install/index.php - the wizard now shows a single "API Token"
    field when QRZCALL.EU is selected (toggled via JS, no extra
    HTML page state machine). callbook_combination() validates
    the pat_ prefix when present.
  • install/includes/core/core_class.php - refactored to support
    both username/password-style providers (qrz/hamqth/qrzcq/qrzru)
    and token-style providers (qrzcall) cleanly. Drops the
    "all callbooks use the same shape" assumption.

End-to-end re-tested:
  ✓ Live PAT lookup PA4R via the new library                HTTP 200
  ✓ Unknown callsign XX9XX9XX                                error: "Callsign not found"
  ✓ Tampered token                                           error: "Invalid or revoked QRZCALL.EU API token"
  ✓ Subscription gate (Free user with revoked sub)          surfaces upstream 401
  ✓ php -l clean on all 6 files
  ✓ All 5 patches dry-run apply cleanly against fresh master

Existing JWT flow on api.qrzcall.eu/v1/auth/login.php remains
available — this PR moves Wavelog to the recommended pattern but
doesn't break anyone who already wired up JWT.
2026-05-14 10:59:42 +02:00
Ronald de Heer
50bd9e6f1b Add QRZCALL.EU as a callbook provider
QRZCALL.EU is a QRZ-compatible amateur-radio callsign database
(https://qrzcall.eu/). This adds it as a new 'qrzcall' callbook source
alongside the existing qrz, qrzcq, hamqth, and qrzru providers.

* `application/libraries/Qrzcall.php` — new library, mirrors Qrz.php
* `application/libraries/Callbook.php` — adds case 'qrzcall', `_qrzcall()`
  private method, session-duration constant and session-cache key
* `application/config/config.sample.php` — adds `qrzcall_username` /
  `qrzcall_password` defaults
* `install/index.php` — adds QRZCALL.EU to the install-wizard callbook
  dropdown and extends the tooltip
* `install/config/config.php` — adds `%qrzcall_username%` /
  `%qrzcall_password%` placeholders so the wizard writes the credentials
  into the generated config
* `install/includes/core/core_class.php` — adds 'qrzcall' to the
  $callbooks whitelist

Auth: callsign + password → JWT (cached 7h). The bearer pattern is
hidden behind the existing "session key" abstraction so the Callbook
orchestrator's retry-on-expiry and /portable fallback paths work
unchanged.

Access tier: requires a Data or Extra subscription on QRZCALL.EU.

XML schema: identical field names to QRZ.com → no downstream changes
to the QSO entry form.
2026-05-12 17:29:56 +02:00
HB9HIL
d3f22710aa
fixed documentation links 2026-03-19 16:42:52 +01:00
HB9HIL
26340f3ca1
refactoring 2026-03-18 15:26:31 +01:00
Fabian Berg
5d6c57b738
Merge branch 'dev' into dev 2026-03-17 08:45:36 +01:00
HB9HIL
b9ac56cab7
updated cookie logic to the syntax of post php 7.3 era and made samesite configurable, while http only is hardcoded to true 2026-03-16 09:45:17 +01:00
HB9HIL
eae999b2a3
update sample config based on installer config template 2026-03-11 19:44:05 +01:00
HB9HIL
6c43d8d148
removed old comments 2026-03-09 12:09:16 +01:00
HB9HIL
29cc658f14
updated sample config to reflect current development 2026-03-09 12:05:46 +01:00
Fabian Berg
85dd639500
Merge branch 'dev' into dev 2026-03-08 11:40:51 +01:00
HB9HIL
19952d988a
updated wiki links 2026-02-25 12:01:29 +01:00
HB9HIL
c85fb353e3 set default caching type to apcu to improve UX (fallback is always file) 2026-02-20 16:59:11 +01:00
HadleySo
7ffc4b8773
Adding config for name, callsign, and email 2026-02-18 22:20:33 -06:00
HadleySo
8027474f2d
Adding user creation with club memebership 2026-02-18 21:46:44 -06:00
HadleySo
44c70816f3
Adding header auth for existing users 2026-02-18 17:59:13 -06:00
HB9HIL
359441646b make dxcluster refresh time configurable 2026-02-16 08:38:21 +01:00
HB9HIL
09441452ae typos 2026-02-06 22:50:20 +01:00
HB9HIL
909289360e synced configs 2026-02-06 22:42:11 +01:00
HB9HIL
937f09eae7 Drop support for wincache 2026-02-02 10:38:52 +01:00
HB9HIL
a19a79360e added an important note about cache_path since we may force file based caching for larger files instead using the configured adapter 2026-02-01 20:38:29 +01:00
HB9HIL
a1a6342cb6 added a comment to be more clear about file adapter 2026-02-01 20:32:49 +01:00
HB9HIL
f4427c1fa3 APC is legacy and does not exist anymore. But apcu works awesome so adjusted the config sample 2026-02-01 20:30:22 +01:00
HB9HIL
6299e02e81 added key_prefix to the caching config 2026-02-01 20:17:26 +01:00
HB9HIL
3a2bce8646 make the cache adapter as config options and use them when calling the cache lib 2026-02-01 19:33:51 +01:00
HB9HIL
310dcfabba config sync 2026-01-26 14:07:22 +01:00
HB9HIL
86ffc6dd77 improved wording 2026-01-26 13:41:18 +01:00
HB9HIL
ce4a5e7b9d enforce minimum session expiration time of 43200 seconds for security and create session_token instead of using session id for hash creation 2026-01-26 13:04:28 +01:00
int2001
2ce1636786
Introduce (optional) Ratelimiting on API 2026-01-07 07:35:32 +00:00
Andreas Kristiansen
13e361e72a Added to config sample 2026-01-02 13:33:14 +01:00
phl0
0a1ba3e8de
Add headline 2025-12-13 18:13:55 +01:00
phl0
37168a1f09
Some explanations re multi-callbooks in sample config 2025-12-13 18:09:24 +01:00
phl0
973b304a6d
Update sample config 2025-12-10 15:43:24 +01:00
Szymon Porwolik
2d972c66ac Cache improved 2025-11-18 19:41:17 +01:00
Szymon Porwolik
33701834fd New config variable 2025-11-18 18:49:11 +01:00
Szymon Porwolik
4f13ebf9c7 Config.php setting for file cache 2025-11-01 19:23:45 +01:00
Szymon Porwolik
7105c4b39b Removed workaround for Yaesu radios 2025-10-27 15:35:22 +01:00
Szymon Porwolik
299640c52f Reverted previous config.sample.php 2025-10-27 15:25:59 +01:00
Szymon Porwolik
1b74602941 Removed config.php option for cat pooling 2025-10-27 15:23:40 +01:00
Szymon Porwolik
4e67b783f5 CAT polling interval into config file 2025-10-23 19:57:06 +02:00
int2001
3e3ffc09d0
sample-config and menu-entry 2025-08-23 14:57:17 +00:00
HB9HIL
2392caadab config switch to disable qso counter in user list 2025-01-30 20:59:20 +01:00
HB9HIL
96e537c730 make the whole subfolder story more bullet proof 2025-01-22 10:43:01 +01:00
Joerg (DJ7NT)
80bd1f01ac
Merge pull request #1495 from int2001/brute_force_protection
Brute force protection
2025-01-20 16:33:46 +01:00
HB9HIL
505e6ba4a9 show hint about qrz.com login credentials. QRZ.com needs your callsign as username. Email causes issues 2025-01-15 22:33:55 +01:00
int2001
62dea3fc2e
Make amount of failed logins configurable (defaults to 3) 2025-01-13 15:23:14 +00:00