From 584d43c34a7735511fa59917c96e75fd50491834 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Fri, 2 Apr 2021 11:28:11 +0530 Subject: [PATCH] CI: tarpaulin env var --- .github/workflows/linux.yml | 4 +- Cargo.lock | 344 ++++++++++++++++++++---------------- Cargo.toml | 5 +- src/data.rs | 28 +-- static/login/index.html | 12 +- 5 files changed, 217 insertions(+), 176 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 44b497d8..09740bed 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -93,6 +93,7 @@ jobs: # execution so this value is required for preventing meta tests from # panicking GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 + OPEN_API_DOCS: 8e77345f1597e40c2e266cb4e6dee74888918a61 - name: Upload to Codecov @@ -109,7 +110,8 @@ jobs: args: --no-deps --workspace --all-features env: DATABASE_URL: postgres://postgres:password@localhost:5432/postgres - GIT_hash: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value + GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value + OPEN_API_DOCS: 8e77345f1597e40c2e266cb4e6dee74888918a61 - name: Deploy to GitHub Pages if: matrix.version == 'stable' && (github.repository == 'mCaptcha/guard') diff --git a/Cargo.lock b/Cargo.lock index db5989a4..8fdb05e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,26 +2,27 @@ # It is not intended for manual editing. [[package]] name = "actix" -version = "0.11.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543c47e7827f8fcc9d1445bd98ba402137bfce80ee2187429de49c52b5131bd3" +checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" dependencies = [ - "actix-rt 2.1.0", + "actix-rt", "actix_derive", "bitflags", - "bytes 1.0.1", - "crossbeam-channel", - "futures-core", - "futures-sink", - "futures-task", + "bytes 0.5.6", + "crossbeam-channel 0.4.4", + "derive_more", + "futures-channel", "futures-util", "log", "once_cell", "parking_lot", - "pin-project-lite 0.2.6", + "pin-project 0.4.28", "smallvec", - "tokio 1.4.0", - "tokio-util 0.6.5", + "tokio", + "tokio-util", + "trust-dns-proto", + "trust-dns-resolver", ] [[package]] @@ -35,9 +36,9 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project 0.4.27", - "tokio 0.2.25", - "tokio-util 0.3.1", + "pin-project 0.4.28", + "tokio", + "tokio-util", ] [[package]] @@ -47,7 +48,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ "actix-codec", - "actix-rt 1.1.1", + "actix-rt", "actix-service", "actix-utils", "derive_more", @@ -87,7 +88,7 @@ checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874" dependencies = [ "actix-codec", "actix-connect", - "actix-rt 1.1.1", + "actix-rt", "actix-service", "actix-threadpool", "actix-utils", @@ -175,17 +176,7 @@ dependencies = [ "futures-channel", "futures-util", "smallvec", - "tokio 0.2.25", -] - -[[package]] -name = "actix-rt" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b4e57bc1a3915e71526d128baf4323700bd1580bc676239e2298a4c5b001f18" -dependencies = [ - "futures-core", - "tokio 1.4.0", + "tokio", ] [[package]] @@ -195,13 +186,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ "actix-codec", - "actix-rt 1.1.1", + "actix-rt", "actix-service", "actix-utils", "futures-channel", "futures-util", "log", - "mio 0.6.23", + "mio", "mio-uds", "num_cpus", "slab", @@ -215,7 +206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" dependencies = [ "futures-util", - "pin-project 0.4.27", + "pin-project 0.4.28", ] [[package]] @@ -225,7 +216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" dependencies = [ "actix-macros", - "actix-rt 1.1.1", + "actix-rt", "actix-server", "actix-service", "log", @@ -266,7 +257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ "actix-codec", - "actix-rt 1.1.1", + "actix-rt", "actix-service", "bitflags", "bytes 0.5.6", @@ -275,7 +266,7 @@ dependencies = [ "futures-sink", "futures-util", "log", - "pin-project 0.4.27", + "pin-project 0.4.28", "slab", ] @@ -289,7 +280,7 @@ dependencies = [ "actix-http", "actix-macros", "actix-router", - "actix-rt 1.1.1", + "actix-rt", "actix-server", "actix-service", "actix-testing", @@ -331,9 +322,9 @@ dependencies = [ [[package]] name = "actix_derive" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" +checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" dependencies = [ "proc-macro2", "quote", @@ -447,7 +438,7 @@ version = "0.2.1" source = "git+https://github.com/realaravinth/argon2-creds#99c1769430fbf6b420c063fc0de25a7e84086c6a" dependencies = [ "ammonia", - "derive_builder", + "derive_builder 0.9.0", "derive_more", "lazy_static", "rand 0.8.3", @@ -514,7 +505,7 @@ checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" dependencies = [ "actix-codec", "actix-http", - "actix-rt 1.1.1", + "actix-rt", "actix-service", "base64 0.13.0", "bytes 0.5.6", @@ -806,6 +797,16 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +dependencies = [ + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + [[package]] name = "crossbeam-channel" version = "0.5.0" @@ -813,7 +814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils", + "crossbeam-utils 0.8.3", ] [[package]] @@ -823,7 +824,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f6cb3c7f5b8e51bc3ebb73a2327ad4abdbd119dc13223f14f961d2f38486756" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils", + "crossbeam-utils 0.8.3", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg", + "cfg-if 0.1.10", + "lazy_static", ] [[package]] @@ -862,8 +874,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06d4a9551359071d1890820e3571252b91229e0712e7c36b08940e603c5a8fc" +dependencies = [ + "darling_core 0.12.2", + "darling_macro 0.12.2", ] [[package]] @@ -876,7 +898,21 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_core" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b443e5fb0ddd56e0c9bfa47dc060c5306ee500cb731f2b91432dd65589a77684" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", "syn", ] @@ -886,7 +922,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ - "darling_core", + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0220073ce504f12a70efc4e7cdaea9e9b1b324872e7ad96a208056d7a638b81" +dependencies = [ + "darling_core 0.12.2", "quote", "syn", ] @@ -897,25 +944,57 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ - "darling", - "derive_builder_core", + "darling 0.10.2", + "derive_builder_core 0.9.0", "proc-macro2", "quote", "syn", ] +[[package]] +name = "derive_builder" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ef25735c9f0d0c547d2794701600c94abf030ecb740fad1673fa64461f3573" +dependencies = [ + "derive_builder_core 0.10.0", + "derive_builder_macro", +] + [[package]] name = "derive_builder_core" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ - "darling", + "darling 0.10.2", "proc-macro2", "quote", "syn", ] +[[package]] +name = "derive_builder_core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3150f1e84602847b99d3eeb702487fc364f7d6c94f634e944a68fdbaea09e457" +dependencies = [ + "darling 0.12.2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca1008bddefdc08d1e734aeb27b94f384390af261b4d1a8fb51fe19c577f05c" +dependencies = [ + "derive_builder_core 0.10.0", + "syn", +] + [[package]] name = "derive_more" version = "0.99.13" @@ -1218,11 +1297,11 @@ dependencies = [ "actix-files", "actix-http", "actix-identity", - "actix-rt 1.1.1", + "actix-rt", "actix-web", "argon2-creds", "config", - "derive_builder", + "derive_builder 0.9.0", "derive_more", "futures", "lazy_static", @@ -1256,8 +1335,8 @@ dependencies = [ "http", "indexmap", "slab", - "tokio 0.2.25", - "tokio-util 0.3.1", + "tokio", + "tokio-util", "tracing", "tracing-futures", ] @@ -1461,9 +1540,9 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" [[package]] name = "js-sys" -version = "0.3.49" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821" +checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" dependencies = [ "wasm-bindgen", ] @@ -1505,9 +1584,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" +checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714" [[package]] name = "linked-hash-map" @@ -1544,11 +1623,11 @@ dependencies = [ [[package]] name = "m_captcha" -version = "0.1.2" -source = "git+https://github.com/mCaptcha/mCaptcha#ab2f418b571f41adb2c42414fed4415761a3fa52" +version = "0.1.3" +source = "git+https://github.com/mCaptcha/mCaptcha?branch=master#61ee89aee3e421ed7b3292bb3ad71c7e01a40b05" dependencies = [ "actix", - "derive_builder", + "derive_builder 0.9.0", "derive_more", "pow_sha256", "rand 0.8.3", @@ -1609,6 +1688,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "md-5" version = "0.9.1" @@ -1665,25 +1750,12 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.2", + "miow", "net2", "slab", "winapi 0.2.8", ] -[[package]] -name = "mio" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" -dependencies = [ - "libc", - "log", - "miow 0.3.7", - "ntapi", - "winapi 0.3.9", -] - [[package]] name = "mio-uds" version = "0.6.8" @@ -1692,7 +1764,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio 0.6.23", + "mio", ] [[package]] @@ -1707,15 +1779,6 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "net2" version = "0.2.37" @@ -1767,15 +1830,6 @@ dependencies = [ "version_check 0.9.3", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num-traits" version = "0.1.43" @@ -1896,11 +1950,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" dependencies = [ - "pin-project-internal 0.4.27", + "pin-project-internal 0.4.28", ] [[package]] @@ -1914,9 +1968,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" dependencies = [ "proc-macro2", "quote", @@ -1965,11 +2019,11 @@ dependencies = [ [[package]] name = "pow_sha256" -version = "0.2.0" -source = "git+https://github.com/mcaptcha/pow_sha256#1b65c603bdd527e3e1f3b8b565a11fcde48575b5" +version = "0.2.1" +source = "git+https://github.com/mcaptcha/pow_sha256#f97858cd639fa2f807603d2515a6ae09191629cd" dependencies = [ "bincode", - "derive_builder", + "derive_builder 0.10.0", "serde 1.0.125", "sha2", ] @@ -2213,7 +2267,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils", + "crossbeam-utils 0.8.3", ] [[package]] @@ -2564,9 +2618,9 @@ dependencies = [ "byteorder", "bytes 0.5.6", "crc", - "crossbeam-channel", + "crossbeam-channel 0.5.0", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.8.3", "either", "futures-channel", "futures-core", @@ -2624,10 +2678,10 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63fc5454c9dd7aaea3a0eeeb65ca40d06d0d8e7413a8184f7c3a3ffa5056190b" dependencies = [ - "actix-rt 1.1.1", + "actix-rt", "actix-threadpool", "once_cell", - "tokio 0.2.25", + "tokio", "tokio-rustls", ] @@ -2736,6 +2790,12 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "subtle" version = "2.4.0" @@ -2744,9 +2804,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.65" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1d708c221c5a612956ef9f75b37e454e88d1f7b899fbd3a18d4252012d663" +checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702" dependencies = [ "proc-macro2", "quote", @@ -2878,12 +2938,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" dependencies = [ "bytes 0.5.6", + "fnv", "futures-core", "iovec", "lazy_static", "libc", "memchr", - "mio 0.6.23", + "mio", "mio-uds", "num_cpus", "pin-project-lite 0.1.12", @@ -2893,24 +2954,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "tokio" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134af885d758d645f0f0505c9a8b3f9bf8a348fd822e112ab5248138348f1722" -dependencies = [ - "autocfg", - "bytes 1.0.1", - "libc", - "memchr", - "mio 0.7.11", - "once_cell", - "parking_lot", - "pin-project-lite 0.2.6", - "signal-hook-registry", - "winapi 0.3.9", -] - [[package]] name = "tokio-macros" version = "0.2.6" @@ -2930,7 +2973,7 @@ checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", - "tokio 0.2.25", + "tokio", "webpki", ] @@ -2942,24 +2985,11 @@ checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ "bytes 0.5.6", "futures-core", + "futures-io", "futures-sink", "log", "pin-project-lite 0.1.12", - "tokio 0.2.25", -] - -[[package]] -name = "tokio-util" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5143d049e85af7fbc36f5454d990e62c2df705b3589f123b71f441b6b59f443f" -dependencies = [ - "bytes 1.0.1", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.2.6", - "tokio 1.4.0", + "tokio", ] [[package]] @@ -3018,7 +3048,7 @@ dependencies = [ "rand 0.7.3", "smallvec", "thiserror", - "tokio 0.2.25", + "tokio", "url", ] @@ -3037,7 +3067,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", - "tokio 0.2.25", + "tokio", "trust-dns-proto", ] @@ -3240,9 +3270,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" +checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -3250,9 +3280,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3" +checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" dependencies = [ "bumpalo", "lazy_static", @@ -3265,9 +3295,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b" +checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3275,9 +3305,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d" +checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" dependencies = [ "proc-macro2", "quote", @@ -3288,15 +3318,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.72" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa" +checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" [[package]] name = "web-sys" -version = "0.3.49" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310" +checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" dependencies = [ "js-sys", "wasm-bindgen", @@ -3314,9 +3344,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ "webpki", ] diff --git a/Cargo.toml b/Cargo.toml index 42ef51d4..ad2dccf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ path = "./src/tests-migrate.rs" [dependencies] actix-web = "3.3.2" -actix = "0.11" +actix = "0.10" actix-identity = "0.3" actix-http = "2.2" actix-rt = "1" @@ -54,7 +54,8 @@ log = "0.4" lazy_static = "1.4" -m_captcha = { version = "0.1.2", git = "https://github.com/mCaptcha/mCaptcha" } +# m_captcha = { version = "0.1.2", git = "https://github.com/mCaptcha/mCaptcha" } +m_captcha = { branch = "master", git = "https://github.com/mCaptcha/mCaptcha" } rand = "0.8" diff --git a/src/data.rs b/src/data.rs index d9d6b482..2513dad2 100644 --- a/src/data.rs +++ b/src/data.rs @@ -32,7 +32,7 @@ use crate::SETTINGS; pub struct Data { pub db: PgPool, pub creds: Config, - // pub captcha: System, + pub captcha: System, } impl Data { @@ -52,20 +52,20 @@ impl Data { .build() .unwrap(); - // let master = Master::new(SETTINGS.pow.gc).start(); - // let cache = HashCache::default().start(); - // let pow = PoWConfigBuilder::default() - // .salt(SETTINGS.pow.salt.clone()) - // .build() - // .unwrap(); + let master = Master::new(SETTINGS.pow.gc).start(); + let cache = HashCache::default().start(); + let pow = PoWConfigBuilder::default() + .salt(SETTINGS.pow.salt.clone()) + .build() + .unwrap(); - // let captcha = SystemBuilder::default() - // .master(master) - // .cache(cache) - // .pow(pow) - // .build() - // .unwrap(); + let captcha = SystemBuilder::default() + .master(master) + .cache(cache) + .pow(pow) + .build() + .unwrap(); - Data { creds, db } //captcha } + Data { creds, db, captcha } } } diff --git a/static/login/index.html b/static/login/index.html index 950ae6b3..2a5dc6df 100644 --- a/static/login/index.html +++ b/static/login/index.html @@ -48,7 +48,7 @@