Commit graph

564 commits

Author SHA1 Message Date
realaravinth
708a157ee1
rm comments 2021-12-18 19:39:59 +05:30
realaravinth
7a76214701
mark avg_traffic and peak_sustainable_traffic in
mcaptcha_sitekey_user_provided_avg_traffic as non-nullable
2021-12-18 19:09:59 +05:30
realaravinth
784aa26dbb
mv edit sitekey into advance edit sitekey 2021-12-18 18:19:23 +05:30
realaravinth
ff3f5504dd
update sqlx offline compilation schema data 2021-12-18 17:44:07 +05:30
realaravinth
a73542cf18
implement easy sitekey addition 2021-12-18 16:42:27 +05:30
realaravinth
081cdcc803
use crates::PAGES.panel.sitekey.get_edit_easy to get edit route 2021-12-18 16:41:30 +05:30
realaravinth
fa9762200e
mv sitekey edit to easy edit 2021-12-18 16:41:00 +05:30
realaravinth
e874d1477d
link easy variant from advance sitekey add form 2021-12-18 16:40:25 +05:30
realaravinth
fc40593c5d
split sitekey add and edit routes into easy and advance variants 2021-12-18 16:39:20 +05:30
realaravinth
5a49940b89
Get sitekey routes using methods on pages::panel::sitekey::routes::Sitekey
for consistency purposes
2021-12-18 16:00:09 +05:30
realaravinth
f15df541c1
rm url field from DatabaseBuilder 2021-12-18 15:33:17 +05:30
realaravinth
fe1fc3fb20
address clippy lints 2021-12-18 14:10:05 +05:30
realaravinth
e3ff7278a9
update coverage workflow's rust version and tarpaulin version 2021-12-18 14:03:18 +05:30
realaravinth
855dbc60ef
Fixes #8
```
$ cargo test
<--- snip --->
 thread panicked while panicking. aborting.
     Running unittests (target/debug/deps/tests_migrate-7d90f83f506b1b25)
 ```

gdb revealed that demo::demo_account_works receives a SIGKILL due to a
failed test. No idea why it didn't fail the usual way. The part where
the test fails hits an endpoint with the wrong datatype payload, it
should have failed with a 404 when the status was asserted but it
didn't. Fixing that fixed #8.

Additionally, all demo user functionality was restructured to include an
abort functionality, which can be used to kill the loop that deletes and
creates demo user throughout the runtime of the app.
2021-12-18 13:53:05 +05:30
realaravinth
9999bd887a
migrate mcaptcha-glue to @mcaptcha/vanilla-glue 2021-12-16 20:57:39 +05:30
realaravinth
73ce2d1cb1
refactor captcha.rs and levels.rs and rm duration routes 2021-12-16 20:46:50 +05:30
realaravinth
cf4a0f9b73
Update CAPTCHA configuration by updating user provided traffic pattern 2021-12-16 18:15:15 +05:30
realaravinth
05f7e81c21
rename from_user_provided_traffic_pattern to create_easy
isolate non-async test in separate module
2021-12-16 17:47:30 +05:30
realaravinth
5ac0b36255
update dockerfile to make config 2021-12-16 15:55:46 +05:30
realaravinth
b2297eab6d
mv add form into advance 2021-12-10 06:16:38 +05:30
realaravinth
5afa531bb8
build sass using dart-sass, bypassing css extractor 2021-12-10 06:16:03 +05:30
realaravinth
e399f82ac4
Load pow-sha256 polyfill to support browsers that aren't capable of
executing WASM
2021-12-08 14:52:06 +05:30
realaravinth
a075607bae
Document pow section being renamed to captcha 2021-12-03 14:50:55 +05:30
realaravinth
54b14291ec
Implement CAPTCHA configuration estimation from avg, peak and
broke_my_site_traffic

The above metrics are sourced from the user and are stored in the
database to reuse at a later point in time when the mCaptcha instance's
admin changes suggested configuration.

I'm not sure if I want to recompute configuration every time the admin
updates suggested configurations or give the user an option to recompute
based on latest trends. If we recompute on every update, then should the
admin choose very high difficulty_factors then it would hold back the
user's visitors, which is not nice. But there should also be an option
to rerun estimates when older configuration no longer works properly.
2021-12-03 14:26:23 +05:30
realaravinth
42544ec421
rename pow section in settings to captcha and add options to configure
suggested difficulty factors for use in CAPTCHA configurations
estimates

The current CAPTCHA configuration panel requires the user to provide
difficulty factor <--> visitor threshold mapping, which can be tedious
if the user isn't familiar with those parameters. Also, it could lead to
ineffective limiting from mCaptcha's side, should it be configured
improperly.

So an estimate computed from well known statistics like peak, avg and
broke-my-site traffic could go a long way.
2021-12-03 14:21:18 +05:30
realaravinth
032f6040b8
fix clippy lints 2021-12-03 13:41:24 +05:30
realaravinth
2b10aa5d40
run cachebuster in docker build 2021-12-02 20:28:17 +05:30
realaravinth
410232041b
setup librejs license and cachebust service worker file 2021-12-02 14:25:50 +05:30
realaravinth
0126dc0e3a
call proof generator from within a web worker 2021-12-02 14:24:53 +05:30
realaravinth
ab77eed91c
move pow wasm lib out to a separate repo 2021-12-01 21:18:30 +05:30
realaravinth
41b99c1019
LibreJS processing:
Apply X11 and Apache-2.0 to widget JavaScript code to permit
proprietary integration.
2021-12-01 18:12:53 +05:30
realaravinth
7154a309be
mv widget js from out of subdir 2021-12-01 17:43:44 +05:30
realaravinth
481246ffd5
update demo widget link in readme 2021-11-30 21:29:59 +05:30
realaravinth
1883ef1c1c
Docker: update image and optimize for layer caching 2021-11-30 20:57:32 +05:30
realaravinth
eedec7da34
implement librejs compliance 2021-11-30 18:45:02 +05:30
realaravinth
b5af9ee259
it appears actix-web's scope behaviour has changed in the latest beta
release:

Routes 404'd when scope contained trailing slash like so:
let scope = "/api/v1/pow/";
web::scope(scope)//

So had to rm trailing slash in scope
2021-11-29 17:33:08 +05:30
realaravinth
f2f8632679
udpate deps and test openapi spec 2021-11-29 17:32:33 +05:30
realaravinth
6eb75d7a66
upgrade dev dependencies 2021-10-13 10:37:51 +05:30
realaravinth
e78e18a411
fix CI error and cache clippy and fmt jobs 2021-10-08 18:58:20 +05:30
realaravinth
46e7656967
make: clean up help and add documentaiton 2021-10-08 16:02:35 +05:30
realaravinth
975b6ca57a
make: add openapi deps installtion 2021-10-08 15:57:27 +05:30
realaravinth
428d60ebb0
setup openapi spec build chain 2021-10-08 15:55:53 +05:30
realaravinth
9afb63c738
use yaml directly for displaying open api spec 2021-10-08 15:36:42 +05:30
realaravinth
53720ff740
frontend linting 2021-10-08 15:24:29 +05:30
realaravinth
f7afc72d81
update levels in cache when db is updated 2021-08-31 13:54:05 +05:30
realaravinth
b1fd56e9b6
navbar animation 2021-08-23 18:55:57 +05:30
realaravinth
a8c3eaa617
clean up systemgroup interface 2021-08-20 19:17:40 +05:30
realaravinth
068c49080e
handle libmcaptcha actor errors 2021-08-20 18:15:55 +05:30
realaravinth
6ef941f73d
update username 2021-08-13 18:58:04 +05:30
realaravinth
595e79a014
update sqlx data, delete user in username_change test 2021-08-12 17:22:41 +05:30