Skip to content

Release: develop -> main#3886

Merged
davidleomay merged 5 commits into
mainfrom
develop
Jun 15, 2026
Merged

Release: develop -> main#3886
davidleomay merged 5 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

…#3855)

* fix(user): case-insensitive mail lookup to prevent duplicate accounts

After the MSSQL->PostgreSQL cutover (#3620), the duplicate-detection
lookup `getUsersByMail` used an exact, case-sensitive `mail = ?`
comparison. Accounts created before the input lowercase-normalization
(#2695) hold mixed-case mails, so the lookup no longer matched them and
a second account could be created for the same address
(e.g. `Samuel.kullmann@...` vs `samuel.kullmann@...`).

- getUsersByMail now compares LOWER(mail) = :mail (input lowercased)
- migration lowercases legacy user_data.mail and recommendation.recommendedMail
- migration adds a non-unique functional index on LOWER(mail)
- specs cover the case-insensitive lookup and the conflict path

The UNIQUE variant of the index is intentionally deferred to a separate,
gated migration once the existing duplicate accounts are merged.

* fix(auth): retry mail dedup lookup on concurrent create (duplicate key)

Once the unique LOWER(mail) index lands, two simultaneous mail logins for
the same new address could both pass the empty lookup and the second
createUserData would raise a unique violation, surfacing as an unhandled
500. Mirror the duplicate-key handling already used in signIn() by
re-resolving via the mail lookup instead of failing.

* fix(user): normalize mail to lowercase on internal write paths

Defense-in-depth: the @Transform(toLowerCaseTrim) only fires at the HTTP
DTO boundary, so internal callers of createUserData/updateUserDataInternal/
doUpdateUserMail could persist mixed-case mail and bypass the case-insensitive
dedup (and later hit the unique LOWER(mail) index as a hard error). Lowercase
the mail at these write points to keep stored data consistent with the lookup.
davidleomay and others added 4 commits June 15, 2026 14:16
…9) (#3862)

* fix(lightning): block path traversal in LNURL forwarding endpoints (BUG-1209)

Validate link IDs in LightningClient to reject path traversal via
double-encoded slashes. Add admin endpoint to rotate webhook secrets.

* fix(lightning): add validation guards to getLnurlpLink and updateLnurlpLink

* fix(lightning): restore CA-validated https agent for LNbits requests (#3869)

The Agent reuse refactoring dropped the CA-validated httpsAgent from
httpLnBitsConfig, so LNbits requests are verified against system CAs
only. In production LNbits serves the self-signed LND certificate,
which makes every LNbits call fail TLS verification. Reuse one shared
CA-validated agent for both LND and LNbits requests.

---------

Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com>
* fix(payment): align quoted bank fee with actual deposit bank

* fix(payment): restrict vIBAN eligibility to CHF and drop eligibility prediction from quote bank resolution
…ansfers (#3885)

* fix(log): match finance-log transfers by full reference for manual transfers

The finance log pairs bank transfers (senders) with exchange
deposits/withdrawals (receivers) by a shared reference to account for
in-transit funds. getTxReference extracted only trailing digits, which
broke for manually labelled transfers: a date-style reference such as
"21.05.2026" has no usable trailing id and collapsed to the year,
while a letter-suffixed reference resolved to nothing at all. As a
result manual transfers were either left permanently unmatched
(inflating pending balances) or collided across unrelated transfers on
the shared year.

Automated payout references start with a letter and carry the payout id
as a trailing >= 4 digit run (sender "DFX Payout NNNNN", receiver
"DEPOSIT-NNNNN"/"E2E-NNNNN"); these keep matching by payout id.
Manual references start with a digit (date-style) and now pair on the
normalized full reference, which is identical on both sides.

* style(log): fix prettier formatting in log-job spec

* test(log): remove duplicate DEPOSIT receiver test (already covered)
@davidleomay davidleomay merged commit 3070c63 into main Jun 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants