Skip to content

Login Security: 2FA & Passkeys changelog

All notable changes to Login Security: 2FA & Passkeys (kv_login_security_2fa) are documented here. The format follows Keep a Changelog and the project uses Semantic Versioning.

  • An e-mail code that failed because of a PHP error inside another add-on’s mail hook or the mail transport (not only a mail exception) is now logged with its reason in the security log (“E-mail code not sent”), and the fallback sender is tried; the sign-in still stops when no e-mail could be sent. Before, such an error interrupted the sign-in page.
  • The security log could show the reason of an earlier e-mail of the same request for an e-mail code whose user account had just been deleted.
  • Compatibility: CS-Cart and Multi-Vendor 4.22.x
  • E-mail one-time codes could fail with “The e-mail with the code could not be sent” on stores whose mail server only accepts certain sender addresses, although all other store e-mails worked. The add-on sent its e-mails from the company “Site administrator” address, while CS-Cart’s own customer e-mails (password recovery, one-time passwords, registration) use the “User department” address; many SMTP servers reject a sender that is not the mailbox they sign in with. When the first sender is rejected, the e-mail is now sent once more from the User department address, the same sender CS-Cart uses for password recovery. Exactly one e-mail is sent when the first attempt works, and the sign-in still stops when no e-mail could be sent (fail closed). The same fallback applies to the security alert e-mails.
  • The security log now shows why an e-mail code was not sent (event “E-mail code not sent”, Detail column): the reason reported by the mail server, “e-mail template missing or disabled” (Design > E-mail templates), “old file-based e-mail templates” or “no sender address” (Settings > Company). When the fallback sender was needed, the “E-mail code sent” entry says so, so you can correct the Site administrator address. Codes, passwords and credentials never appear in the log. The sign-in page message stays generic.
  • The security log page shows a short checklist (sender addresses, e-mail template, test e-mail) when it lists codes that were not sent.

Free update; settings and data are kept on upgrade.

  • Multi-Vendor: stores that installed 1.1.0 through the CS-Cart Upgrade Center and had turned passwordless passkey sign-in off for administrators in 1.0 got the new vendor switch with its default “on”, so vendor administrators could sign in with a passkey alone against the earlier choice (no credential or second step was weakened; passkeys stay phishing-resistant, only the preference was reverted). On the first synchronization of this release the vendor switch is set to “off” when the administrator switch is off and the vendor switch still shows the default “on”, then a flag is set and later changes are never touched again. “On” is also a possible deliberate choice, so a store that already ran 1.1.x with administrators off and vendors deliberately on is changed once; turn the vendor switch on again if you want it. Settings and data are kept.
  • Rate limits can no longer be bypassed with a forged X-Forwarded-For header; new “Trusted proxies” setting (Settings > Client IP). Before, the per-IP limits of e-mail codes and failed passkey sign-ins used the visitor address from CS-Cart’s fn_get_ip(), which believes X-Forwarded-For and other headers any visitor can send, so sending a new fake address with every request reset the limit. The add-on now uses the connection address (IPv6 visitors are counted per /64 network) and reads a forwarded header only from a proxy: it works out of the box behind Cloudflare (the official ranges are built in) and behind private reverse proxies such as nginx, Varnish (the 4.21 full page cache) or a load balancer on a loopback or private address, where X-Forwarded-For is read from the right and the first non-proxy address is the visitor. A proxy with a public address goes into the new “Trusted proxies” list; $config['kv_client_ip_mode'] / $config['kv_client_ip_trusted_proxies'] in config.local.php set it for every Kavio Labs add-on. Settings and data are kept on upgrade.

Free update. Upgrade in place (upload the new zip over the installed add-on, or the Upgrade Center package): authenticator apps, passkeys, recovery codes, trusted devices, settings and the security log are kept. Do not uninstall first: uninstalling removes every user’s methods by design.

  • E-mail one-time code as a second step, per role (administrators, vendor administrators, customers): off, “Users can turn it on”, or “Always, no setup needed” (users without an app or passkey). 6-digit codes, stored only as keyed hashes and compared in constant time, bound to the browser session, single use, configurable lifetime (2-30 minutes, default 10), 5 tries per code, one code per minute and 5 per 15 minutes per user, 30 per hour per IP. Fail closed: when the e-mail cannot be sent, the sign-in stops.
  • Recovery for a locked-out root administrator without a back door: an administrator with full privileges can reset them after typing their own password again (setting, on by default); the console command php admin.php --dispatch=kv_login_security_2fa_cli.reset --user=<e-mail or id> (also status and unlock) for server owners; the existing KV_LS2FA_EMERGENCY_OFF switch stays. Every reset by someone else is logged and ends all sessions of the user, including “remember me” re-logins.
  • Number of recovery codes per user is configurable (0-20, default 10; 0 = no recovery codes).
  • Separate “passwordless passkey sign-in” switch for the vendor panel (starts with the value of the admin switch on upgrade).
  • API: calls with a sign-in token (/api/auth_tokens, storefront REST API) of users who have two-step sign-in are refused unless allowed in a new setting, so the API cannot bypass the second step. Administrator API keys are not affected.
  • Security log events: e-mail code sent / not sent / limit reached, sessions ended, API token refused. E-mail template “Login security: sign-in code”.
  • Marketplace vendors’ main administrators (Multi-Vendor) can now be reset by marketplace administrators; only the store’s root administrator keeps the extra protection.
  • Admin and vendor panel detection uses CS-Cart’s own area and account type, documented and tested with renamed entry scripts (admin_index / vendor_index in config.local.php).
  • Constant-time comparison for every code, keyed hashes for e-mail codes, attempt limits shared with the account lock, CSRF tokens on every new form.
  • A reset by another administrator or the console also deletes the user’s API sign-in tokens.
  • A “remember me” sign-in saved before a user set up their newest method is refused once, so it cannot skip the new second step.
  • Per-IP e-mail limits apply to customers only and use the visitor’s real address behind a proxy or the full page cache (also for the passwordless passkey limit).
  • Second sign-in step after the password for administrators, vendor administrators and customers, covering every sign-in path that ends in a CS-Cart account (password, e-mail one-time password, social sign-in, phone codes, password-recovery link).
  • Policies per user type: required (forced setup right after the password), optional or off.
  • Authenticator apps (TOTP, RFC 6238) with a QR code drawn on the server, encrypted secrets and replay protection.
  • Passkeys (WebAuthn, ES256 and RS256) as a second step and as passwordless sign-in on the storefront and in the admin and vendor panel.
  • 10 single-use recovery codes stored as keyed hashes.
  • Trusted devices with a configurable lifetime; off for administrators unless allowed.
  • Lock after wrong codes, security e-mails (lock, recovery code used, method added or removed, reset).
  • Admin page Login security (overview per role, users, reset, unlock), security log, profile tab.
  • Root administrator protection and a server-side emergency switch.
  • License client and self-healing upgrades.