Repository navigation
fix(auth): wachtwoordreset geeft geen wachtwoord terug en eist 2FA (G1) - #8248
hisarweb-be wants to merge 701 commits into
Conversation
test(service): cover when the Telegram bot counts as configured and the background webhook registration
…oup limit precedence Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(common,setting): provider-word replacement and free-group limit precedence
… ends in an error Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(middleware): stream error event and end-of-stream marker of the response mask
…the usage number guard Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(middleware): handshake filter, usage number guard and chat path
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(service): cover the affiliate reward queue after a settled payment
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(service): cover the announced bonus rules and the untrusted rate
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(service): cover the euro rate branch of the price refresh
…error answers and the webhook limits Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(controller): refund route refusals, top-up error answers, webhook limits
… open questions and the quality run refusal Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(controller): channel routes, text overrides read, open questions, quality run refusal
The public read limiter keeps its counters for the life of the process, so the two budget tests arrived already spent on a second run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(router): own client address per status-route test run
Een minuut zonder betaald verkeer werd beslist door alleen te kijken of het model een ingeschakelde kanaalnaam heeft; een 503 op de upstream bleef daardoor onzichtbaar op /api/hw/status. De idle-tak gebruikt nu een injecteerbare mini aanroep (SetHwStatusProbe) en schrijft probe_failed als die geen 200 geeft. Zonder probe blijft de routetoets gelden. Refs #HIS-4809 Co-Authored-By: Claude <noreply@anthropic.com>
StartHwStatusJob installeert de probe uit HW_QUALITY_BASE_URL/HW_QUALITY_API_KEY; ontbreekt die configuratie, dan blijft de routetoets gelden. Refs #HIS-4809 Co-Authored-By: Claude <noreply@anthropic.com>
…ake the memory tests rerunnable Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(middleware): Redis path of the public read limit, rerunnable memory tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(middleware): free group tests rerunnable
Een verkocht model met een ingeschakelde kanaalnaam bleef groen terwijl zijn upstream 503 gaf (24-26 okt 2026). De test pint vast dat een stille minuut met een falende mini-aanroep slecht is met reden probe_failed, dat een model zonder route maar met een antwoordende upstream goed is, en dat zonder probe de route weer beslist. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…iner De kwaliteitsmeter leest HW_QUALITY_BASE_URL, _API_KEY, _JUDGE_MODEL en _OUT_DIR uit de omgeving, maar de productie-compose gaf ze niet door en de Coolify-app heeft ze ook niet. De meter kon dus nooit starten: hij weigert zonder die vier en er is nooit een meting verschenen (api.hw.quality/latest geeft measured_at 0). De compose geeft ze nu door (leeg blijft leeg, dus zonder waarden weigert de meting zoals bedoeld), de uitmap hoort op het datavolume, en een toets bewaakt dat de vier regels blijven staan. Co-Authored-By: Claude <noreply@anthropic.com>
fix(deploy): geef de vier HW_QUALITY-variabelen door aan de app-container
web/src/i18n/hw/<lang>.json now holds every key upstream lacks or
translates differently; locales/{en,zh,zh-TW,fr,ru,ja,vi}.json are back to
v1.0.0-rc.48 byte for byte. tr stays in locales/ because upstream has no
tr.json.
Co-Authored-By: Claude <noreply@anthropic.com>
config.ts merges web/src/i18n/hw/<lang>.json over the locale file for the bundled (en) and lazily loaded languages. Admin text overrides still load last and keep the highest priority. A test proves each of our keys wins while every other upstream key stays unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm
The base branch also holds our own files, so every edit to one of them was reported as a new hook in an upstream file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm
chore(hw): own translation keys in their own files, upstream locales untouched
The assistant waited a single 40 s call and then gave the fallback line, while the Lumia channel answered in 20 to 106 s. It now tries the primary model for 12 s and, on a timeout or a 5xx, a second model for 13 s, with one log line per failed attempt. After two timeouts in a row the second model goes first for five minutes. Co-Authored-By: Claude <noreply@anthropic.com>
fix(assistant): a slow channel falls through to a faster model
main.go now carries five own lines against v1.0.0-rc.48 instead of 53: middleware.HwInstall (security headers first, script hashes computed lazily on the first request after the analytics injection), service.HwAfterEnv (batch-update warning and environment validation), service.HwSeedDefaultOptionsLogged (must stay right after InitOptionMap), service.HwStartJobs (all master-node jobs) and the BIND_HOST address. Behaviour is unchanged; the hook list allows main.go five lines. Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#233) * test(hw): golden route policy for mask, free-group limit and reserve gate Walks every route of the real API router through an engine-level recorder that aborts before any handler runs, and compares the policy middleware on each route, in order relative to the auth, with a golden table. It is the safety net for moving the usage limit into the auth. Co-Authored-By: Claude <noreply@anthropic.com> * wip(hw): run free-group limit and reserve gate from the auth hook Controller tests still red; to be fixed before PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm * fix(hw): give the auth-hook gates a known room in route tests The free-group limit and the reserve gate now run from TokenAuth, so every customer route in the controller and router tests meets them. The controller environments widen the free-group limits and pin the reserve capacity, and the router reserve test migrates the account-flag table the free-group gate reads. The comments move from middleware/auth.go into hw_auth_gates.go, the unused HwBureauReserveGate wrapper goes, and middleware/auth.go enters the hook list with its two gate hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm * chore(hw): list the auth gate hooks in the hook list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm --------- Co-authored-by: Claude <noreply@anthropic.com>
… 47 s (#234) * revert(hw): undo the auth-hook gate move (#233), relay latency 7 s -> 47 s Since 789528a went live at 09:34 UTC every relay request takes 40-50 s instead of 6-8 s (klantwacht rounds from 09:39 on, guest chat falls back after 25 s, a one-word completion takes 42-70 s while /v1/models answers in 0.1 s). Revert first so customers get their speed back; the root cause gets its own fix with a latency test before the move lands again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm * chore(hw): list the restored router gate hooks while #233 is reverted Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ts (#236) * wip(hw): claude-namen uit catalogus en modelgids (halverwege, toets retired-claude-names) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(hw): retire the four Claude names from catalogue and customer texts Decision Altuner (5 Nov 2026): claude-fable-5-1, claude-opus-5-5, claude-sonnet-5-5 and claude-haiku-5-5 are no longer advertised or sold. The catalogue (HW_SOLD_MODELS, recommended order, price table, model guide), the setup guides, the vibe page and every other customer text now name only the models that stay on sale; examples that used a Claude name point at the sold model of the same price tier. A new test keeps the four names out, and the existing tests follow the new catalogue. Co-Authored-By: Claude <noreply@anthropic.com> * fix(hw): keep off-sale Claude names billed but off the site price table Add OffSale to the sold-model catalogue: the four Claude names leave the site price table but keep their price and billing until switch-off on 5 Dec 2026. Repair the playground alternative-model parsing so names like gpt-6-astra are no longer cut short. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(hw): move the whole-name model search out of the upstream playground file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(hw): hook budget 2 for the playground import and its blank line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The upstream test file held one own change: a unique cache name per run, so repeated runs cannot add counters together. Upstream solved the same problem in v1.0.0-rc.48 (QuantumNous#8009), so that file is now restored byte for byte to the tag. Our case lives on in service/hw_channel_affinity_test.go as a direct test of the contract: a fresh name starts at zero, two names stay independent, and the name helper never repeats. Verification: go test ./service/ -run TestHwChannelAffinity -count=2, go vet ./service/, node .hw/toets-haaklijst.mjs origin/main HEAD. Co-authored-by: Claude <noreply@anthropic.com>
The tokens-per-second rule (an answer counts only above a real output threshold with a measured generation time) lived in the upstream file pkg/perf_metrics/metrics.go, next to the output minimum it shares with the quality measurement in model/hw_quality.go. It now lives in pkg/hwperf/hwperf.go, and pkg/perf_metrics keeps a thin Sample.countsForSpeed wrapper in its own hw_speed.go, so both upstream call sites there hold one line each instead of nine own lines. The two own tests move to pkg/perf_metrics/hw_speed_test.go and pkg/hwperf/hwperf_test.go, so the upstream test file is byte-for-byte upstream again. Behaviour is unchanged: same threshold, same call sites, same aggregate. pkg/perf_metrics/metrics.go drops from 3 to 1 own lines on the haaklijst. Co-authored-by: Claude <noreply@anthropic.com>
… 11) (#239) * wip(hw): migrate list and option defaults behind hooks (task 11, unfinished) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm * fix(hw): name the option hook and use literal price keys Co-Authored-By: Claude <noreply@anthropic.com> * test(hw): prove HwMigrateModels owns exactly our tables Co-Authored-By: Claude <noreply@anthropic.com> * refactor(hw): fold the option defaults into the hook file The defaults table and the hook it feeds are one hook point on upstream's option map, so they live in one file instead of two, and option.go keeps one call per spot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(hw): count our own hw paths as ours, not as upstream hooks The haaklijst test falls back to the base branch as the upstream measure when no upstream tag is reachable, and the base holds our own files: every added line in service/hw_seed_defaults.go was reported as a hook. A path segment starting with "hw" covers exactly our files (the tag v1.0.0-rc.48 has none of 2669), so those are ours by construction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The our-fork entries and role filters of the root sidebar move to web/src/features/hw/hooks/use-hw-sidebar-extras.ts; the upstream file keeps one call, so an upstream update can be merged without touching our lines. Co-authored-by: Claude <noreply@anthropic.com>
…sk 13) (#241) * test(hw): move console footer and currency remount behind an own frame The upstream layout file now holds one hook line: <HwPageFrame page={...} /> with the same scroll class. The footer, the page wrapper that remounts on a currency switch, and their comments move to web/src/features/hw/components/authenticated-frame.tsx. Behaviour and look stay identical: the same class on the sidebar inset, the same key on the page wrapper, the same compact footer below it. .hw/haaklijst.txt lowers the maximum for that file from 1 to 0. Co-Authored-By: Claude <noreply@anthropic.com> * chore(hw): haaklijst counts the one remaining layout hook line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm --------- Co-authored-by: Claude <noreply@anthropic.com>
* wip(hw): sync-status endpoint (task 17a, unfinished) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNZHqnurUAJQuuXr45BeTm * fix(hw): sync-status leest geen lege sync-tak, merged-tag blijft LF De PR-opvraag ging ook bij een mislukte releaselijst de deur uit met de taknaam "sync/upstream-" (lege tag); die vraag hoort er niet te zijn. Verder: .gitattributes pint pkg/hwsync/merged-tag.txt op eol=lf (Windows schreef CRLF), .hw/sync-upstream.sh schrijft de upstream-tag op de sync-tak vóór de samenvoegcommit, en deploy/README-uitrol.md zegt dat het image altijd van onze eigen ghcr-package of deploy/Dockerfile komt. Co-Authored-By: Claude <noreply@anthropic.com> * fix(hw): haaklijst-toets groen, .gitattributes en deploy-README bewust gehaakt Beide bestanden bestonden al upstream en kregen eigen regels: de eol=lf-pin voor pkg/hwsync/merged-tag.txt en de regel dat het image van onze eigen ghcr-package of deploy/Dockerfile komt. Bewust op de haaklijst met de huidige bovengrens, zodat de CI-stap Haaklijst test groen is. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#242) * feat(hw): read the fork's own sync status in the system-update button The system-update entry compared the running version with the highest upstream GitHub release, which belongs to QuantumNous and says nothing about our fork. It now reads GET /api/hw/sync-status: the highest upstream tag, the tag main already merged, and the open sync pull request. - api.ts calls /api/hw/sync-status and maps the record onto a release. - hw-sync-status.ts (new, ours) holds that mapping and its schema. - releases.ts points the button at our pull request, or at our repository when there is none, and drops the release-list selector. - use-system-update.ts compares upstream against our merged tag, so the running version no longer decides whether a sync is open. Co-Authored-By: Claude <noreply@anthropic.com> * fix(hw): keep the upstream release list and test in the system-update feature Restore selectLatestRelease and the upstream releases.test.ts as they are upstream, and move the fork's sync-status cases into their own test file. Co-Authored-By: Claude <noreply@anthropic.com> * chore(hw): put the releases hook back on the hook list releases.ts keeps upstream's release list and gains only the sync fields and our own download link, so it belongs on the list with its own ceiling. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
hwSeedSoldModelChannels built its 'routed' set from Distinct(model) over all ability rows with no enabled filter, so a sold model left behind with a row on a switched-off channel counted as served and was never repaired. The price table reads only enabled rows, so claude-sonnet-5-5 stayed out of /api/pricing while its Claude siblings were listed. Routed now means an enabled channel that lists the name and carries an enabled ability row for it; otherwise the name is attached to an enabled channel of its family and the derived rows are rebuilt. A disabled channel is never enabled or touched by this step. Refs QuantumNous#7174 Co-authored-by: hisarweb-be <247405836+hisarweb-be@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
…e and customer texts (#236) (#245) Decision Altuner (5 Nov 2026): the Claude names return to the site. This reverts the squash commit d71e286 of PR #236 ("retire the four Claude names from catalogue and customer texts"); the PR has a single parent, so the revert needs no -m. Nothing later touched those files, so the revert applied without conflicts and lost none of the upstream sync work from #237. Restored: the four names in hwSoldModels (OffSale gone with its flag and hwShownSoldModelNames), the site price table and model guide rows, the setup guides, the vibe page and the other customer texts, and the playlist preference (claude-haiku-5-5 / claude-sonnet-5-5) in the playground. Kept from #236: the whole-name model search, so gpt-6 inside gpt-6-astra is no longer read as an offered model. model-name-indexes.ts stays as it was and playground-option-utils.ts keeps its two own lines, now on the haaklijst, with a test that fails on the plain substring search. Verification: go vet ./service/, go test ./service/ -run TestHw, go test ./controller/ -run TestHw, bun run test on web/src/features/hw and on web/src/features/playground plus web/src/features/pricing, node .hw/toets-haaklijst.mjs origin/main HEAD. Co-authored-by: Claude <noreply@anthropic.com>
De statusproef brak na 8 s af en telde dat als "model antwoordt niet". Gemeten 6 nov 2026 15:13-15:30Z: Lumia gaf op 59 van 60 verzoeken 200, maar een derde pas na 28-101 s. Gevolg: alle negen modellen publiek in storing (en creditverlenging) terwijl alles leverde. Een proef die de deadline overschrijdt is nu "geen bewijs", net als een quotumweigering; echt klantverkeer blijft het model meten. 5xx en netwerkfout blijven storing. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…-2026-6865 (#248) Go vulnerability scan werd rood op twee nieuwe adviezen (los van deze PR). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…sp-asvs.md) (#249) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…FA (G1) POST /api/user/reset neemt nu het door de gebruiker gekozen wachtwoord (veld password) en bij 2FA een code (two_fa_code). Zonder password komt PASSWORD_REQUIRED; de link blijft geldig bij een fout wachtwoord of code. Het formulier is bijgewerkt. ASVS V2.5.6 en V2.5.7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Per ongeluk naar de upstream gericht; ingetrokken. |
|
Important Review skippedToo many files! This PR contains 747 files, which is 447 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files.
|
Sluit gat G1 uit docs/hw-owasp-asvs.md (ASVS V2.5.6, V2.5.7).
password, beleid via ValidateNewAccountPassword); de server genereert of retourneert nooit een wachtwoord.two_fa_code(TOTP of back-upcode) verplicht (403 TWO_FA_REQUIRED / TWO_FA_INVALID, bestaande lockout). 2FA blijft aan na de reset.passwordkomt 400 PASSWORD_REQUIRED met duidelijke tekst; de resetlink blijft geldig bij een fout wachtwoord of code. Sessies worden zoals voorheen ingetrokken.Toetsen: controller/hw_password_reset_test.go (succes, enkelvoudig gebruik, ontbrekend wachtwoord, slechte link, zwak wachtwoord, 2FA ontbreekt/fout/goed).
🤖 Generated with Claude Code