85 Commits

Author SHA1 Message Date
Kailash Nadh
296245a1b3 Add 2FA TOTP support for authentication.
- Allow users to enable TOTP 2FA from the profile page by scanning a QR code.
- Create new `internal/tmptokens` in-memory token store for temp tokens for
  temporary login -> 2FA flow.
- Refactor reset methods to use this package instead of inline locked map.
2025-11-20 23:23:54 +05:30
dependabot[bot]
4c3b58cb90 Bump golang.org/x/crypto from 0.40.0 to 0.45.0 (#2766)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.40.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.40.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 10:29:00 +05:30
dependabot[bot]
e8b0eafc00 Bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0 (#2634)
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 18:30:21 +05:30
Kailash Nadh
09d291e119 Add support for built-in ALTCHA CAPTCHA implementation.
The existing hCaptcha implementation as the only CAPTCHA option isn't ideal
as hCaptcha is a proprietary SaaS provider. This commit adds supports for
ALTCHA (altcha.org) a self-contained "proof-of-work" based CAPTCHA option.

Closes #2243.
2025-08-16 16:48:20 +05:30
Kailash Nadh
89b270427b Update deps and remove obsolete replace in go.mod. Closes #2567. 2025-07-12 20:53:40 +05:30
Kailash Nadh
b71d80e546 Upgrade smtppool lib with error-return bugfix. Ref: #2503 2025-07-02 23:31:37 +05:30
dependabot[bot]
aa864fd5bf Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#2543)
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.3.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-29 12:39:24 +05:30
Joice
3f3950855a updates simples3 to latest version (#2520)
Co-authored-by: Joice M. Joseph <joice.m@zerodha.com>
2025-06-05 18:15:58 +05:30
Kailash Nadh
d3c8eca446 Upgrade Go deps. 2025-04-24 12:00:05 +05:30
dependabot[bot]
375e385666 Bump golang.org/x/net from 0.36.0 to 0.38.0 (#2413)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.36.0 to 0.38.0.
- [Commits](https://github.com/golang/net/compare/v0.36.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-18 14:01:03 +05:30
Kailash Nadh
6efb6e7600 Upgrade smtppool to v2 and add support for concrete SSL options. 2025-03-29 17:05:03 +05:30
Kailash Nadh
f310131669 Update Go version to v1.24.1 2025-03-18 20:22:44 +05:30
Kailash Nadh
d43ac10790 Tidy go.mod 2025-03-18 20:01:25 +05:30
dependabot[bot]
f34551d2c2 Bump golang.org/x/net from 0.33.0 to 0.36.0 (#2348)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 10:07:47 +05:30
dependabot[bot]
2005e7a425 Bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (#2346)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.3...v3.0.4)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-12 22:24:47 +05:30
Kailash Nadh
afa717fddc Upgrade smtp-pool lib fixing non-FQDN hostnames. Closes #2146. 2025-01-20 00:21:14 +05:30
dependabot[bot]
c87715628d Bump golang.org/x/net from 0.23.0 to 0.33.0 (#2253)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 10:48:40 +05:30
dependabot[bot]
9bad699a5c Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#2083)
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 17:24:56 +05:30
dependabot[bot]
d35dbb0f55 Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 (#2084)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3.0.3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.1...v3.0.3)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 17:24:46 +05:30
Kailash Nadh
7bb14de42e Upgrade simplesessions to v3. 2024-10-13 16:59:51 +05:30
Kailash Nadh
57ac9dca4b Add public login page and auth middleware and handlers. 2024-10-13 16:59:51 +05:30
Marc Bärtschi
1b7128abf2 Implement OIDC
This is a simple OIDC implementation. It's very basic and just logs the user in. Access control needs to be done on the IDP side.
2024-10-13 16:59:50 +05:30
dependabot[bot]
22890a17a1 Bump golang.org/x/image from 0.10.0 to 0.18.0 (#1914)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.10.0 to 0.18.0.
- [Commits](https://github.com/golang/image/compare/v0.10.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-28 23:37:17 +05:30
dependabot[bot]
e968718935 Bump golang.org/x/net from 0.20.0 to 0.23.0 (#1833)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 14:02:47 +05:30
Kailash Nadh
7c44eb02a4 Replace Go easyjson lib. 2024-01-27 20:59:24 +05:30
Kailash Nadh
f14df890a4 Update Go deps. 2024-01-27 20:55:50 +05:30
Kailash Nadh
5a3664aee2 Add support for caching slow queries on large databases.
- Add materialized views for list -> subscriber counts, dashboard chart,
  and dashboard aggregate stats that slow down significantly on large
  databases (with millions or tens of millions of subscribers). These
  slow queries involve full table scan COUNTS().

- Add a toggle to enable caching slow results in Settings -> Performance.

- Add support for setting a cron string that crons and periodically
  refreshes aggregated stats in materialized views.

Closes #1019.
2024-01-27 15:51:12 +05:30
Kailash Nadh
a6d55d63b1 Upgrade smtp-pool lib fixing bad conn state issues. 2024-01-04 23:44:45 +05:30
dependabot[bot]
80b2537c1d Bump golang.org/x/crypto from 0.15.0 to 0.17.0 (#1632)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 20:58:53 +05:30
Kailash Nadh
53eb71a83b Add 404 HTTP handlers to prevent those requests going to BasicAuth endpoints. 2023-11-25 11:53:56 +05:30
dependabot[bot]
82c74cd544 Bump golang.org/x/image from 0.6.0 to 0.10.0 (#1580)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.6.0 to 0.10.0.
- [Commits](https://github.com/golang/image/compare/v0.6.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-11 20:33:06 +05:30
dependabot[bot]
764a052ecc Bump golang.org/x/net from 0.8.0 to 0.17.0 (#1555)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-15 20:42:38 +05:30
Ryan Lahfa
25513b8104 go: bump to 1.20 (#1479) 2023-08-27 13:24:47 +05:30
Kailash Nadh
e0cda4b35c Fix all pagination. Closes #1356. Closes #1357. 2023-06-03 16:19:10 +05:30
Kailash Nadh
3b9a0f782e Add support for file attachments on campaigns (#1341)
- Adds support for arbitrary file uploads with an admin setting to select allowed file extensions.
- Adds support for attaching media (files) to campaigns.
2023-05-18 16:55:59 +05:30
Kailash Nadh
39a627d839 Upgrade koanf lib to fix mapstructure []byte unmarshal bug. 2023-04-12 22:00:09 +05:30
Kailash Nadh
13ad9adb8b Upgrade koanf to v2. 2023-04-10 12:45:25 +05:30
Kailash Nadh
3646e6d20a Upgrade Go package deps. 2023-03-19 22:58:38 +05:30
dependabot[bot]
7be73d59d6 Bump golang.org/x/sys from 0.0.0-20211205182925-97ca703d548d to 0.1.0 (#1212)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20211205182925-97ca703d548d to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-26 11:28:04 +05:30
Kailash Nadh
274d86422c Upgrade smtp-pool lib fixing incorrect nested mail commands. 2023-01-30 23:07:53 +05:30
Kailash Nadh
4dee2e9a1b Fix per_page=all in API calls in the paginator lib.
Closes #1098.
2022-12-25 00:43:58 +05:30
Kailash Nadh
a8193d80c8 Tidy go.mod 2022-11-10 23:31:15 +05:30
Kailash Nadh
f958f3d24b Add RSS feed to the public mailing list archive. 2022-11-10 23:30:53 +05:30
Kailash Nadh
56a9836e86 Integrate paginator library in place of custom pagination function. 2022-11-10 23:30:50 +05:30
Kailash Nadh
74322cda36 Fix e-mail From/Return-Path envelope sender. Closes #908, closes #1008. 2022-11-10 00:01:24 +05:30
dependabot[bot]
db2fd9ad70 Bump github.com/labstack/echo/v4 from 4.6.1 to 4.9.0 (#962)
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.6.1 to 4.9.0.
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.6.1...v4.9.0)

---
updated-dependencies:
- dependency-name: github.com/labstack/echo/v4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-01 14:12:31 +05:30
Kailash Nadh
ee448170ef Add support for testing SMTP connections in the settings UI. 2022-07-11 19:44:44 +05:30
Joe Paul
a1df02b41c feat(postback): Add attachment, from email to postback body 2022-06-27 15:47:38 +05:30
Rohan
5dd5cb1cc3 feat: bump simples3 for digitalocean support 2022-02-22 11:30:56 +05:30
Kailash Nadh
0f6a0376da Add accurate realtime message rate counter.
The `rate` field `/api/campaigns/running/stats` returned was computed
based on the total time spent from the start of the campaign to the
current time. This meant that for large campaigns, if there were
pauses or slowdowns in between, the rate would be skewed heavily
making it useless to figure out the current send rate.

This commit introduces a realtime running rate counter in the campaign
manager that returns accurate (running) send rates for the last minute.

The `rate` field in the API now shows the live running rate and a
new `net_rate` field shows the rate from the beginning of the campaign.
2022-02-06 11:38:02 +05:30