mCaptcha / cache

Redis module that implements mCaptcha cache and counter
https://mcaptcha.org
GNU Affero General Public License v3.0
5 stars 3 forks source link

Is this module compatible with Redis 7? #9

Open mzch opened 1 year ago

mzch commented 1 year ago

I built cache module and restarted redis-server.

192411:C 10 Sep 2023 01:17:30.922 * Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit.
3192411:C 10 Sep 2023 01:17:30.922 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3192411:C 10 Sep 2023 01:17:30.922 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=3192411, just started
3192411:C 10 Sep 2023 01:17:30.922 # Configuration loaded
3192411:M 10 Sep 2023 01:17:30.922 * monotonic clock: POSIX clock_gettime
3192411:M 10 Sep 2023 01:17:30.923 * Running mode=standalone, port=6379.
3192411:M 10 Sep 2023 01:17:30.923 # Server initialized
3192411:M 10 Sep 2023 01:17:30.923 * <mcaptcha_cache> Created new data type 'mcaptbuck'
3192411:M 10 Sep 2023 01:17:30.923 * <mcaptcha_cache> Created new data type 'mcaptmcap'
3192411:M 10 Sep 2023 01:17:30.923 * <mcaptcha_cache> Created new data type 'mcaptsafe'
3192411:M 10 Sep 2023 01:17:30.923 * <mcaptcha_cache> Created new data type 'mcaptchal'
3192411:M 10 Sep 2023 01:17:30.923 * Module 'mcaptcha_cache' loaded from /usr/local/lib/libcache.so
3192411:M 10 Sep 2023 01:17:30.924 * Loading RDB produced by version 7.0.11
3192411:M 10 Sep 2023 01:17:30.924 * RDB age 0 seconds
3192411:M 10 Sep 2023 01:17:30.924 * RDB memory usage when created 18.91 Mb
3192411:M 10 Sep 2023 01:17:30.960 * Done loading RDB, keys loaded: 5300, keys expired: 0.
3192411:M 10 Sep 2023 01:17:30.960 * DB loaded from disk: 0.036 seconds
3192411:M 10 Sep 2023 01:17:30.960 * Ready to accept connections

But mCaptcha reported an error:

 INFO  mcaptcha > mcaptcha: mCaptcha - a PoW-based CAPTCHA system.
For more information, see: https://mcaptcha.org
Build info:
Version: 0.1.0 commit: f337ee0643d88723776e1de4e5588dfdb6c0c574
 INFO  mcaptcha::settings > Loading config file from /etc/mcaptcha/config.toml
 INFO  mcaptcha::data     > Initializing credential manager
 INFO  sqlx::postgres::notice > relation "_sqlx_migrations" already exists, skipping
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: MCaptchaRedisModuleIsNotLoaded', src/data.rs:134:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Is this compatible with redis-server 7?

realaravinth commented 11 months ago

Apologies for the delay, I was a little busy with school :sweat_smile:

This error is due to a typo in an older version of libmCaptcha that mCaptcha/mCaptcha uses.

The demo instance is somehow unaffected by it, even though I have watchtower auto-updating it on releases. So I didn't realize this was a problem. I'm rushing to fix it now.

Is this compatible with redis-server 7?

I'm not sure about the earlier versions, but the master supports Redis v6.0 and above.

In the next couple of weeks, I'll set up additional integration that deploys the entire distribution and runts tests on updates to each repository. Hopefully that'll prevent breakages like this one.

realaravinth commented 11 months ago

Should work right now, PR updated mCaptcha/mCaptcha with the latest version of libmCaptcha. I will close this issue after I have integration tests going.