CI: tarpaulin env var

This commit is contained in:
realaravinth 2021-04-02 11:28:11 +05:30
parent e83ed3d8ea
commit 584d43c34a
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
5 changed files with 217 additions and 176 deletions

View file

@ -93,6 +93,7 @@ jobs:
# execution so this value is required for preventing meta tests from # execution so this value is required for preventing meta tests from
# panicking # panicking
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61
OPEN_API_DOCS: 8e77345f1597e40c2e266cb4e6dee74888918a61
- name: Upload to Codecov - name: Upload to Codecov
@ -109,7 +110,8 @@ jobs:
args: --no-deps --workspace --all-features args: --no-deps --workspace --all-features
env: env:
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres 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 - name: Deploy to GitHub Pages
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/guard') if: matrix.version == 'stable' && (github.repository == 'mCaptcha/guard')

344
Cargo.lock generated
View file

@ -2,26 +2,27 @@
# It is not intended for manual editing. # It is not intended for manual editing.
[[package]] [[package]]
name = "actix" name = "actix"
version = "0.11.1" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "543c47e7827f8fcc9d1445bd98ba402137bfce80ee2187429de49c52b5131bd3" checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60"
dependencies = [ dependencies = [
"actix-rt 2.1.0", "actix-rt",
"actix_derive", "actix_derive",
"bitflags", "bitflags",
"bytes 1.0.1", "bytes 0.5.6",
"crossbeam-channel", "crossbeam-channel 0.4.4",
"futures-core", "derive_more",
"futures-sink", "futures-channel",
"futures-task",
"futures-util", "futures-util",
"log", "log",
"once_cell", "once_cell",
"parking_lot", "parking_lot",
"pin-project-lite 0.2.6", "pin-project 0.4.28",
"smallvec", "smallvec",
"tokio 1.4.0", "tokio",
"tokio-util 0.6.5", "tokio-util",
"trust-dns-proto",
"trust-dns-resolver",
] ]
[[package]] [[package]]
@ -35,9 +36,9 @@ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"log", "log",
"pin-project 0.4.27", "pin-project 0.4.28",
"tokio 0.2.25", "tokio",
"tokio-util 0.3.1", "tokio-util",
] ]
[[package]] [[package]]
@ -47,7 +48,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt 1.1.1", "actix-rt",
"actix-service", "actix-service",
"actix-utils", "actix-utils",
"derive_more", "derive_more",
@ -87,7 +88,7 @@ checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-connect", "actix-connect",
"actix-rt 1.1.1", "actix-rt",
"actix-service", "actix-service",
"actix-threadpool", "actix-threadpool",
"actix-utils", "actix-utils",
@ -175,17 +176,7 @@ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
"smallvec", "smallvec",
"tokio 0.2.25", "tokio",
]
[[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",
] ]
[[package]] [[package]]
@ -195,13 +186,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt 1.1.1", "actix-rt",
"actix-service", "actix-service",
"actix-utils", "actix-utils",
"futures-channel", "futures-channel",
"futures-util", "futures-util",
"log", "log",
"mio 0.6.23", "mio",
"mio-uds", "mio-uds",
"num_cpus", "num_cpus",
"slab", "slab",
@ -215,7 +206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"pin-project 0.4.27", "pin-project 0.4.28",
] ]
[[package]] [[package]]
@ -225,7 +216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c"
dependencies = [ dependencies = [
"actix-macros", "actix-macros",
"actix-rt 1.1.1", "actix-rt",
"actix-server", "actix-server",
"actix-service", "actix-service",
"log", "log",
@ -266,7 +257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt 1.1.1", "actix-rt",
"actix-service", "actix-service",
"bitflags", "bitflags",
"bytes 0.5.6", "bytes 0.5.6",
@ -275,7 +266,7 @@ dependencies = [
"futures-sink", "futures-sink",
"futures-util", "futures-util",
"log", "log",
"pin-project 0.4.27", "pin-project 0.4.28",
"slab", "slab",
] ]
@ -289,7 +280,7 @@ dependencies = [
"actix-http", "actix-http",
"actix-macros", "actix-macros",
"actix-router", "actix-router",
"actix-rt 1.1.1", "actix-rt",
"actix-server", "actix-server",
"actix-service", "actix-service",
"actix-testing", "actix-testing",
@ -331,9 +322,9 @@ dependencies = [
[[package]] [[package]]
name = "actix_derive" name = "actix_derive"
version = "0.6.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -447,7 +438,7 @@ version = "0.2.1"
source = "git+https://github.com/realaravinth/argon2-creds#99c1769430fbf6b420c063fc0de25a7e84086c6a" source = "git+https://github.com/realaravinth/argon2-creds#99c1769430fbf6b420c063fc0de25a7e84086c6a"
dependencies = [ dependencies = [
"ammonia", "ammonia",
"derive_builder", "derive_builder 0.9.0",
"derive_more", "derive_more",
"lazy_static", "lazy_static",
"rand 0.8.3", "rand 0.8.3",
@ -514,7 +505,7 @@ checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-http", "actix-http",
"actix-rt 1.1.1", "actix-rt",
"actix-service", "actix-service",
"base64 0.13.0", "base64 0.13.0",
"bytes 0.5.6", "bytes 0.5.6",
@ -806,6 +797,16 @@ dependencies = [
"cfg-if 1.0.0", "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]] [[package]]
name = "crossbeam-channel" name = "crossbeam-channel"
version = "0.5.0" version = "0.5.0"
@ -813,7 +814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"crossbeam-utils", "crossbeam-utils 0.8.3",
] ]
[[package]] [[package]]
@ -823,7 +824,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f6cb3c7f5b8e51bc3ebb73a2327ad4abdbd119dc13223f14f961d2f38486756" checksum = "0f6cb3c7f5b8e51bc3ebb73a2327ad4abdbd119dc13223f14f961d2f38486756"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "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]] [[package]]
@ -862,8 +874,18 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.10.2",
"darling_macro", "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]] [[package]]
@ -876,7 +898,21 @@ dependencies = [
"ident_case", "ident_case",
"proc-macro2", "proc-macro2",
"quote", "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", "syn",
] ]
@ -886,7 +922,18 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
dependencies = [ 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", "quote",
"syn", "syn",
] ]
@ -897,25 +944,57 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0"
dependencies = [ dependencies = [
"darling", "darling 0.10.2",
"derive_builder_core", "derive_builder_core 0.9.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "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]] [[package]]
name = "derive_builder_core" name = "derive_builder_core"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef"
dependencies = [ dependencies = [
"darling", "darling 0.10.2",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "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]] [[package]]
name = "derive_more" name = "derive_more"
version = "0.99.13" version = "0.99.13"
@ -1218,11 +1297,11 @@ dependencies = [
"actix-files", "actix-files",
"actix-http", "actix-http",
"actix-identity", "actix-identity",
"actix-rt 1.1.1", "actix-rt",
"actix-web", "actix-web",
"argon2-creds", "argon2-creds",
"config", "config",
"derive_builder", "derive_builder 0.9.0",
"derive_more", "derive_more",
"futures", "futures",
"lazy_static", "lazy_static",
@ -1256,8 +1335,8 @@ dependencies = [
"http", "http",
"indexmap", "indexmap",
"slab", "slab",
"tokio 0.2.25", "tokio",
"tokio-util 0.3.1", "tokio-util",
"tracing", "tracing",
"tracing-futures", "tracing-futures",
] ]
@ -1461,9 +1540,9 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.49" version = "0.3.50"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821" checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c"
dependencies = [ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
@ -1505,9 +1584,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.91" version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714"
[[package]] [[package]]
name = "linked-hash-map" name = "linked-hash-map"
@ -1544,11 +1623,11 @@ dependencies = [
[[package]] [[package]]
name = "m_captcha" name = "m_captcha"
version = "0.1.2" version = "0.1.3"
source = "git+https://github.com/mCaptcha/mCaptcha#ab2f418b571f41adb2c42414fed4415761a3fa52" source = "git+https://github.com/mCaptcha/mCaptcha?branch=master#61ee89aee3e421ed7b3292bb3ad71c7e01a40b05"
dependencies = [ dependencies = [
"actix", "actix",
"derive_builder", "derive_builder 0.9.0",
"derive_more", "derive_more",
"pow_sha256", "pow_sha256",
"rand 0.8.3", "rand 0.8.3",
@ -1609,6 +1688,12 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "maybe-uninit"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]] [[package]]
name = "md-5" name = "md-5"
version = "0.9.1" version = "0.9.1"
@ -1665,25 +1750,12 @@ dependencies = [
"kernel32-sys", "kernel32-sys",
"libc", "libc",
"log", "log",
"miow 0.2.2", "miow",
"net2", "net2",
"slab", "slab",
"winapi 0.2.8", "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]] [[package]]
name = "mio-uds" name = "mio-uds"
version = "0.6.8" version = "0.6.8"
@ -1692,7 +1764,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0"
dependencies = [ dependencies = [
"iovec", "iovec",
"libc", "libc",
"mio 0.6.23", "mio",
] ]
[[package]] [[package]]
@ -1707,15 +1779,6 @@ dependencies = [
"ws2_32-sys", "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]] [[package]]
name = "net2" name = "net2"
version = "0.2.37" version = "0.2.37"
@ -1767,15 +1830,6 @@ dependencies = [
"version_check 0.9.3", "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]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.1.43" version = "0.1.43"
@ -1896,11 +1950,11 @@ dependencies = [
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "0.4.27" version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f"
dependencies = [ dependencies = [
"pin-project-internal 0.4.27", "pin-project-internal 0.4.28",
] ]
[[package]] [[package]]
@ -1914,9 +1968,9 @@ dependencies = [
[[package]] [[package]]
name = "pin-project-internal" name = "pin-project-internal"
version = "0.4.27" version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1965,11 +2019,11 @@ dependencies = [
[[package]] [[package]]
name = "pow_sha256" name = "pow_sha256"
version = "0.2.0" version = "0.2.1"
source = "git+https://github.com/mcaptcha/pow_sha256#1b65c603bdd527e3e1f3b8b565a11fcde48575b5" source = "git+https://github.com/mcaptcha/pow_sha256#f97858cd639fa2f807603d2515a6ae09191629cd"
dependencies = [ dependencies = [
"bincode", "bincode",
"derive_builder", "derive_builder 0.10.0",
"serde 1.0.125", "serde 1.0.125",
"sha2", "sha2",
] ]
@ -2213,7 +2267,7 @@ dependencies = [
"base64 0.13.0", "base64 0.13.0",
"blake2b_simd", "blake2b_simd",
"constant_time_eq", "constant_time_eq",
"crossbeam-utils", "crossbeam-utils 0.8.3",
] ]
[[package]] [[package]]
@ -2564,9 +2618,9 @@ dependencies = [
"byteorder", "byteorder",
"bytes 0.5.6", "bytes 0.5.6",
"crc", "crc",
"crossbeam-channel", "crossbeam-channel 0.5.0",
"crossbeam-queue", "crossbeam-queue",
"crossbeam-utils", "crossbeam-utils 0.8.3",
"either", "either",
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -2624,10 +2678,10 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63fc5454c9dd7aaea3a0eeeb65ca40d06d0d8e7413a8184f7c3a3ffa5056190b" checksum = "63fc5454c9dd7aaea3a0eeeb65ca40d06d0d8e7413a8184f7c3a3ffa5056190b"
dependencies = [ dependencies = [
"actix-rt 1.1.1", "actix-rt",
"actix-threadpool", "actix-threadpool",
"once_cell", "once_cell",
"tokio 0.2.25", "tokio",
"tokio-rustls", "tokio-rustls",
] ]
@ -2736,6 +2790,12 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "subtle" name = "subtle"
version = "2.4.0" version = "2.4.0"
@ -2744,9 +2804,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.65" version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a1d708c221c5a612956ef9f75b37e454e88d1f7b899fbd3a18d4252012d663" checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2878,12 +2938,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092"
dependencies = [ dependencies = [
"bytes 0.5.6", "bytes 0.5.6",
"fnv",
"futures-core", "futures-core",
"iovec", "iovec",
"lazy_static", "lazy_static",
"libc", "libc",
"memchr", "memchr",
"mio 0.6.23", "mio",
"mio-uds", "mio-uds",
"num_cpus", "num_cpus",
"pin-project-lite 0.1.12", "pin-project-lite 0.1.12",
@ -2893,24 +2954,6 @@ dependencies = [
"winapi 0.3.9", "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]] [[package]]
name = "tokio-macros" name = "tokio-macros"
version = "0.2.6" version = "0.2.6"
@ -2930,7 +2973,7 @@ checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"rustls", "rustls",
"tokio 0.2.25", "tokio",
"webpki", "webpki",
] ]
@ -2942,24 +2985,11 @@ checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [ dependencies = [
"bytes 0.5.6", "bytes 0.5.6",
"futures-core", "futures-core",
"futures-io",
"futures-sink", "futures-sink",
"log", "log",
"pin-project-lite 0.1.12", "pin-project-lite 0.1.12",
"tokio 0.2.25", "tokio",
]
[[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",
] ]
[[package]] [[package]]
@ -3018,7 +3048,7 @@ dependencies = [
"rand 0.7.3", "rand 0.7.3",
"smallvec", "smallvec",
"thiserror", "thiserror",
"tokio 0.2.25", "tokio",
"url", "url",
] ]
@ -3037,7 +3067,7 @@ dependencies = [
"resolv-conf", "resolv-conf",
"smallvec", "smallvec",
"thiserror", "thiserror",
"tokio 0.2.25", "tokio",
"trust-dns-proto", "trust-dns-proto",
] ]
@ -3240,9 +3270,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.72" version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"wasm-bindgen-macro", "wasm-bindgen-macro",
@ -3250,9 +3280,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.72" version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3" checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
@ -3265,9 +3295,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.72" version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b" checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@ -3275,9 +3305,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.72" version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d" checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3288,15 +3318,15 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.72" version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa" checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489"
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.49" version = "0.3.50"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310" checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",
@ -3314,9 +3344,9 @@ dependencies = [
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.21.0" version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940"
dependencies = [ dependencies = [
"webpki", "webpki",
] ]

View file

@ -23,7 +23,7 @@ path = "./src/tests-migrate.rs"
[dependencies] [dependencies]
actix-web = "3.3.2" actix-web = "3.3.2"
actix = "0.11" actix = "0.10"
actix-identity = "0.3" actix-identity = "0.3"
actix-http = "2.2" actix-http = "2.2"
actix-rt = "1" actix-rt = "1"
@ -54,7 +54,8 @@ log = "0.4"
lazy_static = "1.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" rand = "0.8"

View file

@ -32,7 +32,7 @@ use crate::SETTINGS;
pub struct Data { pub struct Data {
pub db: PgPool, pub db: PgPool,
pub creds: Config, pub creds: Config,
// pub captcha: System<HashCache>, pub captcha: System<HashCache>,
} }
impl Data { impl Data {
@ -52,20 +52,20 @@ impl Data {
.build() .build()
.unwrap(); .unwrap();
// let master = Master::new(SETTINGS.pow.gc).start(); let master = Master::new(SETTINGS.pow.gc).start();
// let cache = HashCache::default().start(); let cache = HashCache::default().start();
// let pow = PoWConfigBuilder::default() let pow = PoWConfigBuilder::default()
// .salt(SETTINGS.pow.salt.clone()) .salt(SETTINGS.pow.salt.clone())
// .build() .build()
// .unwrap(); .unwrap();
// let captcha = SystemBuilder::default() let captcha = SystemBuilder::default()
// .master(master) .master(master)
// .cache(cache) .cache(cache)
// .pow(pow) .pow(pow)
// .build() .build()
// .unwrap(); .unwrap();
Data { creds, db } //captcha } Data { creds, db, captcha }
} }
} }

View file

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
<script> <script>
export const SUBMIT = '/'; export const SUBMIT = '/api/v1/signup';
export const isBlankString = (event, value, field) => { export const isBlankString = (event, value, field) => {
if (!value.replace(/\s/g, '').length) { if (!value.replace(/\s/g, '').length) {
@ -77,8 +77,16 @@
let payload = { let payload = {
username, username,
password
} }
fetch(SUBMIT, genJsonPayload(payload)).then(resp => {
if (resp.ok) {
aslert('signed in');
} else {
resp.json().then(err => alert(`Error ${resp.error}`));
}
});
}; };
let form = document.getElementById('form'); let form = document.getElementById('form');