Aravinth Manivannan
4e2758f415
chore: clippy lints
2023-10-16 21:50:53 +05:30
Aravinth Manivannan
0e75a22beb
chore: bump sqlx to 0.7
2023-10-16 21:15:44 +05:30
Aravinth Manivannan
78d85ab9a9
feat: annotate license headers using reuse on text source files
2023-07-03 23:19:51 +05:30
Aravinth Manivannan
32762cf6b5
fix: linting
2023-07-02 22:04:42 +05:30
Aravinth Manivannan
1e0aedad61
chore: linting
2023-07-02 21:51:24 +05:30
Aravinth Manivannan
468752f691
feat: advance siteey create now allows setting publication status
2023-06-30 16:49:35 +05:30
Aravinth Manivannan
22edb04ce2
feat: advance sitekey edit now allows modifying publication status
2023-06-30 16:48:53 +05:30
Aravinth Manivannan
6834e555d8
chore: use db util method to check publication status
2023-06-30 16:33:20 +05:30
Aravinth Manivannan
56dba7b77f
feat: option to publish pow performance numbers. Can un/publish from edit page too.
2023-06-30 07:55:12 +05:30
Aravinth Manivannan
2cf5e48d8e
feat: log pow performance stats while pow verification
2023-06-30 03:19:38 +05:30
realaravinth
21825582e5
feat: fallabck to localhost when running tests
2022-08-09 16:29:24 +05:30
realaravinth
c377cf431e
feat & fix: ip queues
2022-08-09 02:52:17 +05:30
Kian-Meng Ang
bb42841a66
Fix typos
2022-08-04 23:06:54 +08:00
realaravinth
249b6461ee
chore: migrate tests to also run with mariadb
2022-07-23 11:59:42 +05:30
realaravinth
9371416398
fix: normalize username during login process too
...
credits: @gusted
2022-07-23 02:24:30 +05:30
realaravinth
7d0e4c6be4
fix: prevent sitekey abuse with account secret authentication for access token validation
...
SUMMARY
At present, sitekey can be abused by installing it on a third-party
site as verifying the access token returned from CAPTCHA validation
doesn't require any authentication.
This fix uses account secret authentication to verify access tokens
credits: by @gusted
2022-07-22 19:44:35 +05:30
realaravinth
5daeffd6fb
chore: tests to verify mCaptcha counter
2022-05-31 12:46:09 +05:30
realaravinth
629c841e2d
chore: cleanup and addressing clippy lints
2022-05-27 18:37:59 +05:30
realaravinth
d7fd23f565
chore: get rid of direct DB init and use db_*
2022-05-27 18:25:27 +05:30
realaravinth
098d0cfc24
feat: migrate fetching stats to use db_*
2022-05-27 17:11:15 +05:30
realaravinth
bbc8873762
feat: migrate record_stats to use db_*
2022-05-27 16:23:33 +05:30
realaravinth
4cd4605266
chore: use local app ctx
2022-05-27 15:25:10 +05:30
realaravinth
12edac7915
feat: migrate get_email to use db_*
2022-05-27 03:08:37 +05:30
realaravinth
aad49dbb94
feat: migrate notifications add, mark_read and get to use db_* traits
2022-05-26 20:03:05 +05:30
realaravinth
e4cf625d48
feat: migrate del traffic pattern to use db_* interface
2022-05-14 18:57:58 +05:30
realaravinth
a6920f5f36
feat: migrate add user's traffic pattern sqlx postgres to use db_*
2022-05-14 18:22:50 +05:30
realaravinth
d061824660
feat: migrate get captcha cooldown period to use db_*
2022-05-14 16:27:44 +05:30
realaravinth
a971d4209d
fix and chore: refactor tests to minimize initializing DB connections
...
SUMMARY
The test suite was spinning up way too many database connections that what's
strictly needed and so the test suite was failing with[0]:
code: "53300", message: "sorry, too many clients already"
EXPERIMENTS
Tried sharing database connection pool across all tests with
async_once[0] but faced:
- IO errors
The connections were probably getting dropped in between tests
- actix Actor errors
The actor was probably not getting initialized before a
a reference to the async_once initialized app
context(crate::data::Data) is retrieved and used
FIX
crate::tests was spinning up an App context
instance(crate::data::Data) for most utility functions, which was
unnecessarily excessive.
Each test now creates an instance of the application context at the
beginning and shared a reference with all test utility functions. So
number of database connections/app context instance = number of unit
tests.
[0]: permanently fixes #22
[1]: https://docs.rs/async_once/latest/async_once/
2022-05-14 12:55:56 +05:30
realaravinth
176df3c7a7
feat: migrate get captcha levels to use db_*
2022-05-13 19:09:29 +05:30
realaravinth
2dff139ae2
feat: migrate update_key to use db_*
2022-05-12 20:22:43 +05:30
realaravinth
add7271531
feat: migrate updating captcha metadata to use db_*
2022-05-12 20:09:56 +05:30
realaravinth
b6445000fe
feat: migrate delete captcha to use db_* interface
2022-05-12 19:56:23 +05:30
realaravinth
81ad030338
feat: migrate captcha exists to use db_* interface
2022-05-12 19:32:08 +05:30
realaravinth
bd75fc625c
feat: migrate adding captcha to use db_* interface
2022-05-12 19:10:04 +05:30
realaravinth
0d3d552ae0
feat: migrate create captcha to use db_*
2022-05-12 18:59:44 +05:30
realaravinth
049f2b6eea
feat: migrate update secret to use db_* interface
2022-05-12 10:42:55 +05:30
realaravinth
25b3d316db
feat: migrate get password and get secret to use db_* interface
2022-05-11 20:21:55 +05:30
realaravinth
f165581e17
chore: lints
2022-05-11 20:11:11 +05:30
realaravinth
96995bc068
feat: migrate get password to use db_* interface
2022-05-11 20:11:02 +05:30
realaravinth
39ee2ad221
feat: migrate update username to use db_* interface
2022-05-11 20:02:03 +05:30
realaravinth
748f48e0d2
feat: migrate update password to use db_* interface
2022-05-11 19:52:20 +05:30
realaravinth
f398c4b61c
feat: migrate get password to use db_* interface
2022-05-11 18:54:36 +05:30
realaravinth
78eac8b6b7
feat: migrate email update to use db_* interface
2022-05-11 15:26:00 +05:30
realaravinth
621e400ea8
feat: migrate email exists to use db_* interface
2022-05-11 13:33:30 +05:30
realaravinth
1cd4ce7318
feat: migrate username exists to use db_* interface
2022-05-11 13:33:29 +05:30
realaravinth
9f91854c4d
feat: migrate account deletion to use db_* interface
2022-05-11 13:33:29 +05:30
realaravinth
4248959b13
feat: migrate user regisration to use db_*
2022-05-11 13:33:29 +05:30
realaravinth
f337721b25
feat: move health endpoint to use ping from db_*
2022-05-11 13:33:29 +05:30
realaravinth
91c6f77cab
chore: update actix-* deps
2022-05-07 16:10:14 +05:30
realaravinth
a668fafa62
feat: migrate v1 api mod to use actix_auth_middleware
2022-05-07 12:29:37 +05:30