-
crossbeam::channel::Receiver::try_recv
is non-blocking and results in busy waiting, which caused high CPU usage even when idling. Switching tocrossbeam::channel::Receiver::recv
to fixed this. -
System::verify_pow
returnsCaptchaResult<(String, u32)>
, where the secondu32
is the difficulty factor of the challenge factor.
libmcaptcha::system::System
: extra parameterqueue_length
. PoW IP queues are limited by queue_length
libmcaptcha::system::System
: extra parameterrunners
. PoW are now scheduled for execution based on IP addresses.
Master
trait: provides methods to manage mCaptchaMCaptcha::get_defense()
: returns theMCaptcha
instance's defense configuration
-
PoWConfig
has an extra field to send internalPoW
salt to clients. Salt is used to prevent dictionary attacks using rainbow tables. This salt shouldn't be used elsewhere in the program as it's exposed to the internet. IdeallymCaptcha
should automatically generate random salt and rotate periodically, maybe in the next version. -
master::Master
is moved tomaster::embedded::master
in preparation for Redis based implementation. -
AddSite
message forMaster
now requires an instance ofcrate::mcaptcha::MCaptcha
. In the case ofcrate::master::embedded::master
, it automatically startsCounter
actor. -
System::get_pow
returnserrors::CaptchaResult<Option<PoWConfig>>
instead ofOption<PoWConfig>
MCaptcha::decrement_visiotr
: seemed redundant whenMCaptcha::decrement_visitor_by
was available
HashCache
was extended to store captcha responsesHashCache
was extended to cache site keys when cachingPoW
configurations as a result:Retrieve
RetrievePoW
now returnsCachedPoWConfig
- random token generation post
PoW
verification - token validation
Cache
becameCachePoW
(HashCache
extension)Retrieve
becameRetrievePoW
(HashCache
extension)DeleteString
becameDeletePoW
(HashCache
extension)Save
trait now requires three new message impls (HashCache
extension_System.verify_pow
now returns aString
instead ofbool
CachePoW
constructor was removed in favour ofCachwPoWBuilder
- a bug in
mCaptcha/pow_sha256
was causing errors in PoW computation
actix
upgraded to0.11
Master
packs a garbage collector to stop and get rid of inactiveMCaptcha
actorsserde::{Serialize, Deserialize}
impls (shouldn't break anything)
- typo fix:
MCaptcha::decrement_visiotr()
becameMCaptcha::decrement_visitor()
MCaptcha
throws error when duration is 0Visitor
is changed toAddVisitor
Master
constructor accepts a parameter to configure GC(see previous point) period