├── .dockerignore ├── .github ├── FUNDING.yml └── workflows │ ├── docker.yml │ ├── rust.yaml │ ├── triage_issue.yml │ └── triage_pr.yml ├── .gitignore ├── Autumn.toml ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE ├── README.md └── src ├── config.rs ├── db.rs ├── main.rs ├── routes ├── download.rs ├── index.rs ├── mod.rs ├── serve.rs └── upload.rs ├── util ├── mod.rs ├── result.rs └── variables.rs ├── version.rs └── virus_scan.rs /.dockerignore: -------------------------------------------------------------------------------- 1 | docker-compose.yml 2 | .mongo 3 | target 4 | files 5 | data 6 | .env -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: insertish 2 | custom: https://insrt.uk/donate 3 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | push: 5 | branches: 6 | - "master" 7 | tags: 8 | - "*" 9 | paths-ignore: 10 | - ".github/**" 11 | - "!.github/workflows/docker.yml" 12 | - ".vscode/**" 13 | - ".gitignore" 14 | - ".gitlab-ci.yml" 15 | - "LICENSE" 16 | - "README" 17 | pull_request: 18 | branches: 19 | - "master" 20 | paths: 21 | - "Dockerfile" 22 | workflow_dispatch: 23 | 24 | jobs: 25 | test: 26 | runs-on: ubuntu-latest 27 | strategy: 28 | matrix: 29 | architecture: [linux/amd64] 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v2 33 | with: 34 | submodules: "recursive" 35 | - name: Set up QEMU 36 | uses: docker/setup-qemu-action@v1 37 | - name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v1 39 | - name: Cache Docker layers 40 | uses: actions/cache@v2 41 | with: 42 | path: /tmp/.buildx-cache/${{ matrix.architecture }} 43 | key: ${{ runner.os }}-buildx-${{ matrix.architecture }}-${{ github.sha }} 44 | - name: Build 45 | uses: docker/build-push-action@v2 46 | with: 47 | context: . 48 | platforms: ${{ matrix.architecture }} 49 | cache-from: type=local,src=/tmp/.buildx-cache/${{ matrix.architecture }} 50 | cache-to: type=local,dest=/tmp/.buildx-cache-new/${{ matrix.architecture }},mode=max 51 | - name: Move cache 52 | run: | 53 | rm -rf /tmp/.buildx-cache/${{ matrix.architecture }} 54 | mv /tmp/.buildx-cache-new/${{ matrix.architecture }} /tmp/.buildx-cache/${{ matrix.architecture }} 55 | 56 | publish_amd64: 57 | needs: [test] 58 | runs-on: ubuntu-latest 59 | if: github.event_name != 'pull_request' 60 | steps: 61 | - name: Checkout 62 | uses: actions/checkout@v2 63 | with: 64 | submodules: "recursive" 65 | - name: Set up QEMU 66 | uses: docker/setup-qemu-action@v1 67 | - name: Set up Docker Buildx 68 | uses: docker/setup-buildx-action@v1 69 | - name: Cache amd64 Docker layers 70 | uses: actions/cache@v2 71 | with: 72 | path: /tmp/.buildx-cache/linux/amd64 73 | key: ${{ runner.os }}-buildx-linux/amd64-${{ github.sha }} 74 | - name: Docker meta 75 | id: meta 76 | uses: docker/metadata-action@v3 77 | with: 78 | images: revoltchat/autumn, ghcr.io/revoltchat/autumn 79 | - name: Login to DockerHub 80 | uses: docker/login-action@v1 81 | with: 82 | username: ${{ secrets.DOCKERHUB_USERNAME }} 83 | password: ${{ secrets.DOCKERHUB_TOKEN }} 84 | - name: Login to Github Container Registry 85 | uses: docker/login-action@v1 86 | with: 87 | registry: ghcr.io 88 | username: ${{ github.actor }} 89 | password: ${{ secrets.GITHUB_TOKEN }} 90 | - name: Build and publish 91 | uses: docker/build-push-action@v2 92 | with: 93 | context: . 94 | push: true 95 | platforms: linux/amd64 96 | tags: ${{ steps.meta.outputs.tags }} 97 | labels: ${{ steps.meta.outputs.labels }} 98 | cache-from: type=local,src=/tmp/.buildx-cache/linux/amd64 99 | cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max 100 | - name: Move cache 101 | run: | 102 | rm -rf /tmp/.buildx-cache 103 | mv /tmp/.buildx-cache-new /tmp/.buildx-cache 104 | -------------------------------------------------------------------------------- /.github/workflows/rust.yaml: -------------------------------------------------------------------------------- 1 | name: Rust build and test 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | check: 14 | name: Rust project 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Install latest nightly 19 | uses: actions-rs/toolchain@v1 20 | with: 21 | toolchain: nightly 22 | override: true 23 | components: rustfmt, clippy 24 | 25 | - name: Run cargo build 26 | uses: actions-rs/cargo@v1 27 | with: 28 | command: build 29 | 30 | - name: Run cargo test 31 | uses: actions-rs/cargo@v1 32 | with: 33 | command: test 34 | -------------------------------------------------------------------------------- /.github/workflows/triage_issue.yml: -------------------------------------------------------------------------------- 1 | name: Add Issue to Board 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | track_issue: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Get project data 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.PAT }} 14 | run: | 15 | gh api graphql -f query=' 16 | query { 17 | organization(login: "revoltchat"){ 18 | projectV2(number: 3) { 19 | id 20 | fields(first:20) { 21 | nodes { 22 | ... on ProjectV2SingleSelectField { 23 | id 24 | name 25 | options { 26 | id 27 | name 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | }' > project_data.json 35 | 36 | echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV 37 | echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV 38 | echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV 39 | 40 | - name: Add issue to project 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.PAT }} 43 | ISSUE_ID: ${{ github.event.issue.node_id }} 44 | run: | 45 | item_id="$( gh api graphql -f query=' 46 | mutation($project:ID!, $issue:ID!) { 47 | addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) { 48 | item { 49 | id 50 | } 51 | } 52 | }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')" 53 | 54 | echo 'ITEM_ID='$item_id >> $GITHUB_ENV 55 | -------------------------------------------------------------------------------- /.github/workflows/triage_pr.yml: -------------------------------------------------------------------------------- 1 | name: Add PR to Board 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, synchronize, ready_for_review, review_requested] 6 | 7 | jobs: 8 | track_pr: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Get project data 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.PAT }} 14 | run: | 15 | gh api graphql -f query=' 16 | query { 17 | organization(login: "revoltchat"){ 18 | projectV2(number: 5) { 19 | id 20 | fields(first:20) { 21 | nodes { 22 | ... on ProjectV2SingleSelectField { 23 | id 24 | name 25 | options { 26 | id 27 | name 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | }' > project_data.json 35 | 36 | echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV 37 | echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV 38 | echo 'INCOMING_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="🆕 Untriaged") |.id' project_data.json) >> $GITHUB_ENV 39 | 40 | - name: Add PR to project 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.PAT }} 43 | PR_ID: ${{ github.event.pull_request.node_id }} 44 | run: | 45 | item_id="$( gh api graphql -f query=' 46 | mutation($project:ID!, $pr:ID!) { 47 | addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { 48 | item { 49 | id 50 | } 51 | } 52 | }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" 53 | 54 | echo 'ITEM_ID='$item_id >> $GITHUB_ENV 55 | 56 | - name: Set fields 57 | env: 58 | GITHUB_TOKEN: ${{ secrets.PAT }} 59 | run: | 60 | gh api graphql -f query=' 61 | mutation ( 62 | $project: ID! 63 | $item: ID! 64 | $status_field: ID! 65 | $status_value: String! 66 | ) { 67 | set_status: updateProjectV2ItemFieldValue(input: { 68 | projectId: $project 69 | itemId: $item 70 | fieldId: $status_field 71 | value: { 72 | singleSelectOptionId: $status_value 73 | } 74 | }) { 75 | projectV2Item { 76 | id 77 | } 78 | } 79 | }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.INCOMING_OPTION_ID }} --silent 80 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docker-compose.yml 2 | /target 3 | .mongo 4 | files 5 | /data 6 | /adata 7 | .env 8 | tmp 9 | -------------------------------------------------------------------------------- /Autumn.toml: -------------------------------------------------------------------------------- 1 | jpeg_quality = 80 2 | 3 | [serve] 4 | as = "WEBP" 5 | quality = 90.0 6 | 7 | [tags] 8 | # File Uploads 9 | [tags.attachments] 10 | max_size = 20000000 11 | serve_if_field_present = ["object_id", "message_id"] 12 | 13 | # User Avatars 14 | [tags.avatars] 15 | max_size = 4000000 16 | restrict_content_type = "Image" 17 | serve_if_field_present = ["object_id", "user_id"] 18 | 19 | # User Profile Backgrounds 20 | [tags.backgrounds] 21 | max_size = 6000000 22 | restrict_content_type = "Image" 23 | serve_if_field_present = ["object_id", "user_id"] 24 | 25 | # Channel / Server Icons 26 | [tags.icons] 27 | max_size = 2500000 28 | restrict_content_type = "Image" 29 | serve_if_field_present = ["object_id"] 30 | 31 | # Banners 32 | [tags.banners] 33 | max_size = 6000000 34 | restrict_content_type = "Image" 35 | serve_if_field_present = ["object_id", "server_id"] 36 | 37 | # Emoji 38 | [tags.emojis] 39 | use_ulid = true 40 | max_size = 500000 41 | restrict_content_type = "Image" 42 | serve_if_field_present = ["object_id"] 43 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "actix-codec" 7 | version = "0.4.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "1d5dbeb2d9e51344cb83ca7cc170f1217f9fe25bfc50160e6e200b5c31c1019a" 10 | dependencies = [ 11 | "bitflags", 12 | "bytes", 13 | "futures-core", 14 | "futures-sink", 15 | "log", 16 | "pin-project-lite", 17 | "tokio", 18 | "tokio-util", 19 | ] 20 | 21 | [[package]] 22 | name = "actix-cors" 23 | version = "0.6.0-beta.2" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "01552b8facccd5d7a4cc5d8e2b07d306160c97a4968181c2db965533389c8725" 26 | dependencies = [ 27 | "actix-service", 28 | "actix-web", 29 | "derive_more", 30 | "futures-util", 31 | "log", 32 | "once_cell", 33 | "smallvec", 34 | ] 35 | 36 | [[package]] 37 | name = "actix-files" 38 | version = "0.6.0-beta.7" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "5924236735e9f8f35843a79b77d9c5215a52fc66dd80af8c05e40d93984a1657" 41 | dependencies = [ 42 | "actix-http", 43 | "actix-service", 44 | "actix-utils", 45 | "actix-web", 46 | "askama_escape", 47 | "bitflags", 48 | "bytes", 49 | "derive_more", 50 | "futures-core", 51 | "http-range", 52 | "log", 53 | "mime", 54 | "mime_guess", 55 | "percent-encoding", 56 | ] 57 | 58 | [[package]] 59 | name = "actix-http" 60 | version = "3.0.0-beta.10" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "dd38a862fa7fead2b47ee55e550982aba583ebc7365ccf0155b49934ad6f16f9" 63 | dependencies = [ 64 | "actix-codec", 65 | "actix-rt", 66 | "actix-service", 67 | "actix-tls", 68 | "actix-utils", 69 | "ahash 0.7.4", 70 | "base64", 71 | "bitflags", 72 | "brotli2", 73 | "bytes", 74 | "bytestring", 75 | "derive_more", 76 | "encoding_rs", 77 | "flate2", 78 | "futures-core", 79 | "futures-util", 80 | "h2", 81 | "http", 82 | "httparse", 83 | "itoa", 84 | "language-tags", 85 | "local-channel", 86 | "log", 87 | "mime", 88 | "once_cell", 89 | "percent-encoding", 90 | "pin-project", 91 | "pin-project-lite", 92 | "rand 0.8.4", 93 | "regex", 94 | "serde", 95 | "sha-1", 96 | "smallvec", 97 | "time 0.2.27", 98 | "tokio", 99 | "zstd", 100 | ] 101 | 102 | [[package]] 103 | name = "actix-macros" 104 | version = "0.2.1" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "c2f86cd6857c135e6e9fe57b1619a88d1f94a7df34c00e11fe13e64fd3438837" 107 | dependencies = [ 108 | "quote", 109 | "syn", 110 | ] 111 | 112 | [[package]] 113 | name = "actix-multipart" 114 | version = "0.4.0-beta.6" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "a46aa32c3dcf7b4ba74c7fd37a17159e8d0205449b667a1239dfe32b29b1c40d" 117 | dependencies = [ 118 | "actix-utils", 119 | "actix-web", 120 | "bytes", 121 | "derive_more", 122 | "futures-core", 123 | "futures-util", 124 | "httparse", 125 | "local-waker", 126 | "log", 127 | "mime", 128 | "twoway", 129 | ] 130 | 131 | [[package]] 132 | name = "actix-router" 133 | version = "0.5.0-beta.2" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "36b95ce0d76d1aa2f98b681702807475ade0f99bd4552546a6843a966d42ea3d" 136 | dependencies = [ 137 | "bytestring", 138 | "firestorm", 139 | "http", 140 | "log", 141 | "regex", 142 | "serde", 143 | ] 144 | 145 | [[package]] 146 | name = "actix-rt" 147 | version = "2.2.0" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "bc7d7cd957c9ed92288a7c3c96af81fa5291f65247a76a34dac7b6af74e52ba0" 150 | dependencies = [ 151 | "actix-macros", 152 | "futures-core", 153 | "tokio", 154 | ] 155 | 156 | [[package]] 157 | name = "actix-server" 158 | version = "2.0.0-beta.5" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "26369215fcc3b0176018b3b68756a8bcc275bb000e6212e454944913a1f9bf87" 161 | dependencies = [ 162 | "actix-rt", 163 | "actix-service", 164 | "actix-utils", 165 | "futures-core", 166 | "log", 167 | "mio", 168 | "num_cpus", 169 | "slab", 170 | "tokio", 171 | ] 172 | 173 | [[package]] 174 | name = "actix-service" 175 | version = "2.0.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "77f5f9d66a8730d0fae62c26f3424f5751e5518086628a40b7ab6fca4a705034" 178 | dependencies = [ 179 | "futures-core", 180 | "paste", 181 | "pin-project-lite", 182 | ] 183 | 184 | [[package]] 185 | name = "actix-tls" 186 | version = "3.0.0-beta.5" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "65b7bb60840962ef0332f7ea01a57d73a24d2cb663708511ff800250bbfef569" 189 | dependencies = [ 190 | "actix-codec", 191 | "actix-rt", 192 | "actix-service", 193 | "actix-utils", 194 | "derive_more", 195 | "futures-core", 196 | "http", 197 | "log", 198 | "tokio-util", 199 | ] 200 | 201 | [[package]] 202 | name = "actix-utils" 203 | version = "3.0.0" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" 206 | dependencies = [ 207 | "local-waker", 208 | "pin-project-lite", 209 | ] 210 | 211 | [[package]] 212 | name = "actix-web" 213 | version = "4.0.0-beta.9" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "d34aa2b23ec9c7c9a799b3cf9258f67c91b18ac3f0f5f484e175c7ac46739bb5" 216 | dependencies = [ 217 | "actix-codec", 218 | "actix-http", 219 | "actix-macros", 220 | "actix-router", 221 | "actix-rt", 222 | "actix-server", 223 | "actix-service", 224 | "actix-utils", 225 | "actix-web-codegen", 226 | "ahash 0.7.4", 227 | "bytes", 228 | "cfg-if 1.0.0", 229 | "cookie", 230 | "derive_more", 231 | "either", 232 | "encoding_rs", 233 | "futures-core", 234 | "futures-util", 235 | "itoa", 236 | "language-tags", 237 | "log", 238 | "mime", 239 | "once_cell", 240 | "paste", 241 | "pin-project", 242 | "regex", 243 | "serde", 244 | "serde_json", 245 | "serde_urlencoded", 246 | "smallvec", 247 | "socket2 0.4.2", 248 | "time 0.2.27", 249 | "url", 250 | ] 251 | 252 | [[package]] 253 | name = "actix-web-codegen" 254 | version = "0.5.0-beta.4" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "4a11fd6f322120a74b23327e778ef0a4950b1f44a2b76468a69316a150f5c6dd" 257 | dependencies = [ 258 | "actix-router", 259 | "proc-macro2", 260 | "quote", 261 | "syn", 262 | ] 263 | 264 | [[package]] 265 | name = "adler" 266 | version = "1.0.2" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 269 | 270 | [[package]] 271 | name = "ahash" 272 | version = "0.4.7" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" 275 | 276 | [[package]] 277 | name = "ahash" 278 | version = "0.7.4" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" 281 | dependencies = [ 282 | "getrandom", 283 | "once_cell", 284 | "version_check", 285 | ] 286 | 287 | [[package]] 288 | name = "aho-corasick" 289 | version = "0.7.18" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 292 | dependencies = [ 293 | "memchr 2.4.1", 294 | ] 295 | 296 | [[package]] 297 | name = "anyhow" 298 | version = "1.0.44" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" 301 | 302 | [[package]] 303 | name = "askama_escape" 304 | version = "0.10.1" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "90c108c1a94380c89d2215d0ac54ce09796823cca0fd91b299cfff3b33e346fb" 307 | 308 | [[package]] 309 | name = "async-trait" 310 | version = "0.1.51" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" 313 | dependencies = [ 314 | "proc-macro2", 315 | "quote", 316 | "syn", 317 | ] 318 | 319 | [[package]] 320 | name = "attohttpc" 321 | version = "0.16.3" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247" 324 | dependencies = [ 325 | "http", 326 | "log", 327 | "native-tls", 328 | "openssl", 329 | "serde", 330 | "serde_json", 331 | "url", 332 | "wildmatch", 333 | ] 334 | 335 | [[package]] 336 | name = "atty" 337 | version = "0.2.14" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 340 | dependencies = [ 341 | "hermit-abi", 342 | "libc", 343 | "winapi", 344 | ] 345 | 346 | [[package]] 347 | name = "autocfg" 348 | version = "0.1.7" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 351 | 352 | [[package]] 353 | name = "autocfg" 354 | version = "1.0.1" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 357 | 358 | [[package]] 359 | name = "autumn" 360 | version = "1.1.11" 361 | dependencies = [ 362 | "actix-cors", 363 | "actix-files", 364 | "actix-multipart", 365 | "actix-web", 366 | "content_inspector", 367 | "dotenv", 368 | "env_logger", 369 | "ffprobe", 370 | "futures", 371 | "image", 372 | "imagesize", 373 | "kamadak-exif", 374 | "lazy_static", 375 | "log", 376 | "mime", 377 | "mongodb", 378 | "nanoid", 379 | "once_cell", 380 | "revolt_clamav-client", 381 | "rust-s3", 382 | "sanitize-filename", 383 | "serde", 384 | "serde_json", 385 | "tempfile", 386 | "tokio", 387 | "tokio-cron-scheduler", 388 | "toml", 389 | "tree_magic", 390 | "ulid", 391 | "webp", 392 | ] 393 | 394 | [[package]] 395 | name = "aws-creds" 396 | version = "0.26.0" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "1331d069460a674d42bd27c12b47ce578f789954c7bd7f239fd030771eca6616" 399 | dependencies = [ 400 | "anyhow", 401 | "attohttpc", 402 | "dirs", 403 | "rust-ini", 404 | "serde", 405 | "serde-xml-rs", 406 | "serde_derive", 407 | "url", 408 | ] 409 | 410 | [[package]] 411 | name = "aws-region" 412 | version = "0.23.2" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "2884b8f2aaeb4a4bf80b219b4fe1d340139ca9331679c57e0fd4a24f571a78bd" 415 | dependencies = [ 416 | "anyhow", 417 | ] 418 | 419 | [[package]] 420 | name = "base-x" 421 | version = "0.2.8" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" 424 | 425 | [[package]] 426 | name = "base64" 427 | version = "0.13.0" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 430 | 431 | [[package]] 432 | name = "bit_field" 433 | version = "0.10.2" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" 436 | 437 | [[package]] 438 | name = "bitflags" 439 | version = "1.3.2" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 442 | 443 | [[package]] 444 | name = "block-buffer" 445 | version = "0.9.0" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 448 | dependencies = [ 449 | "generic-array", 450 | ] 451 | 452 | [[package]] 453 | name = "brotli-sys" 454 | version = "0.3.2" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" 457 | dependencies = [ 458 | "cc", 459 | "libc", 460 | ] 461 | 462 | [[package]] 463 | name = "brotli2" 464 | version = "0.3.2" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" 467 | dependencies = [ 468 | "brotli-sys", 469 | "libc", 470 | ] 471 | 472 | [[package]] 473 | name = "bson" 474 | version = "2.0.0" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "1dcc15cd0b9aff8e8326561dcf0bb6e56d0e559f3a4897f615b4a5075ab54c46" 477 | dependencies = [ 478 | "ahash 0.7.4", 479 | "base64", 480 | "chrono", 481 | "hex", 482 | "indexmap", 483 | "lazy_static", 484 | "rand 0.8.4", 485 | "serde", 486 | "serde_bytes", 487 | "serde_json", 488 | "uuid", 489 | ] 490 | 491 | [[package]] 492 | name = "bumpalo" 493 | version = "3.7.0" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" 496 | 497 | [[package]] 498 | name = "bytemuck" 499 | version = "1.13.1" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" 502 | 503 | [[package]] 504 | name = "byteorder" 505 | version = "1.4.3" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 508 | 509 | [[package]] 510 | name = "bytes" 511 | version = "1.1.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 514 | 515 | [[package]] 516 | name = "bytestring" 517 | version = "1.0.0" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" 520 | dependencies = [ 521 | "bytes", 522 | ] 523 | 524 | [[package]] 525 | name = "cc" 526 | version = "1.0.70" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" 529 | dependencies = [ 530 | "jobserver", 531 | ] 532 | 533 | [[package]] 534 | name = "cfg-if" 535 | version = "0.1.10" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 538 | 539 | [[package]] 540 | name = "cfg-if" 541 | version = "1.0.0" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 544 | 545 | [[package]] 546 | name = "chrono" 547 | version = "0.4.19" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 550 | dependencies = [ 551 | "libc", 552 | "num-integer", 553 | "num-traits", 554 | "time 0.1.43", 555 | "winapi", 556 | ] 557 | 558 | [[package]] 559 | name = "cloudabi" 560 | version = "0.0.3" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 563 | dependencies = [ 564 | "bitflags", 565 | ] 566 | 567 | [[package]] 568 | name = "color_quant" 569 | version = "1.1.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 572 | 573 | [[package]] 574 | name = "const_fn" 575 | version = "0.4.8" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "f92cfa0fd5690b3cf8c1ef2cabbd9b7ef22fa53cf5e1f92b05103f6d5d1cf6e7" 578 | 579 | [[package]] 580 | name = "content_inspector" 581 | version = "0.2.4" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38" 584 | dependencies = [ 585 | "memchr 2.4.1", 586 | ] 587 | 588 | [[package]] 589 | name = "convert_case" 590 | version = "0.4.0" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 593 | 594 | [[package]] 595 | name = "cookie" 596 | version = "0.15.1" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "d5f1c7727e460397e56abc4bddc1d49e07a1ad78fc98eb2e1c8f032a58a2f80d" 599 | dependencies = [ 600 | "percent-encoding", 601 | "time 0.2.27", 602 | "version_check", 603 | ] 604 | 605 | [[package]] 606 | name = "core-foundation" 607 | version = "0.9.1" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" 610 | dependencies = [ 611 | "core-foundation-sys", 612 | "libc", 613 | ] 614 | 615 | [[package]] 616 | name = "core-foundation-sys" 617 | version = "0.8.2" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" 620 | 621 | [[package]] 622 | name = "cpufeatures" 623 | version = "0.2.1" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" 626 | dependencies = [ 627 | "libc", 628 | ] 629 | 630 | [[package]] 631 | name = "crc32fast" 632 | version = "1.2.1" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" 635 | dependencies = [ 636 | "cfg-if 1.0.0", 637 | ] 638 | 639 | [[package]] 640 | name = "cron" 641 | version = "0.8.0" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "628a3464535cee4e75af89e8c293bab926deaddfa166553b75029066c846be3f" 644 | dependencies = [ 645 | "chrono", 646 | "nom 4.1.1", 647 | ] 648 | 649 | [[package]] 650 | name = "crossbeam-channel" 651 | version = "0.5.1" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" 654 | dependencies = [ 655 | "cfg-if 1.0.0", 656 | "crossbeam-utils", 657 | ] 658 | 659 | [[package]] 660 | name = "crossbeam-deque" 661 | version = "0.8.1" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" 664 | dependencies = [ 665 | "cfg-if 1.0.0", 666 | "crossbeam-epoch", 667 | "crossbeam-utils", 668 | ] 669 | 670 | [[package]] 671 | name = "crossbeam-epoch" 672 | version = "0.9.5" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" 675 | dependencies = [ 676 | "cfg-if 1.0.0", 677 | "crossbeam-utils", 678 | "lazy_static", 679 | "memoffset", 680 | "scopeguard", 681 | ] 682 | 683 | [[package]] 684 | name = "crossbeam-utils" 685 | version = "0.8.5" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" 688 | dependencies = [ 689 | "cfg-if 1.0.0", 690 | "lazy_static", 691 | ] 692 | 693 | [[package]] 694 | name = "crunchy" 695 | version = "0.2.2" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 698 | 699 | [[package]] 700 | name = "crypto-mac" 701 | version = "0.10.1" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" 704 | dependencies = [ 705 | "generic-array", 706 | "subtle", 707 | ] 708 | 709 | [[package]] 710 | name = "crypto-mac" 711 | version = "0.11.1" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" 714 | dependencies = [ 715 | "generic-array", 716 | "subtle", 717 | ] 718 | 719 | [[package]] 720 | name = "darling" 721 | version = "0.13.0" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "757c0ded2af11d8e739c4daea1ac623dd1624b06c844cf3f5a39f1bdbd99bb12" 724 | dependencies = [ 725 | "darling_core", 726 | "darling_macro", 727 | ] 728 | 729 | [[package]] 730 | name = "darling_core" 731 | version = "0.13.0" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3" 734 | dependencies = [ 735 | "fnv", 736 | "ident_case", 737 | "proc-macro2", 738 | "quote", 739 | "strsim", 740 | "syn", 741 | ] 742 | 743 | [[package]] 744 | name = "darling_macro" 745 | version = "0.13.0" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc" 748 | dependencies = [ 749 | "darling_core", 750 | "quote", 751 | "syn", 752 | ] 753 | 754 | [[package]] 755 | name = "data-encoding" 756 | version = "2.3.2" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" 759 | 760 | [[package]] 761 | name = "derivative" 762 | version = "2.2.0" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 765 | dependencies = [ 766 | "proc-macro2", 767 | "quote", 768 | "syn", 769 | ] 770 | 771 | [[package]] 772 | name = "derive_more" 773 | version = "0.99.16" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" 776 | dependencies = [ 777 | "convert_case", 778 | "proc-macro2", 779 | "quote", 780 | "rustc_version 0.3.3", 781 | "syn", 782 | ] 783 | 784 | [[package]] 785 | name = "digest" 786 | version = "0.9.0" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 789 | dependencies = [ 790 | "generic-array", 791 | ] 792 | 793 | [[package]] 794 | name = "dirs" 795 | version = "3.0.2" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" 798 | dependencies = [ 799 | "dirs-sys", 800 | ] 801 | 802 | [[package]] 803 | name = "dirs-sys" 804 | version = "0.3.6" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" 807 | dependencies = [ 808 | "libc", 809 | "redox_users", 810 | "winapi", 811 | ] 812 | 813 | [[package]] 814 | name = "discard" 815 | version = "1.0.4" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 818 | 819 | [[package]] 820 | name = "dlv-list" 821 | version = "0.2.3" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "68df3f2b690c1b86e65ef7830956aededf3cb0a16f898f79b9a6f421a7b6211b" 824 | dependencies = [ 825 | "rand 0.8.4", 826 | ] 827 | 828 | [[package]] 829 | name = "dotenv" 830 | version = "0.15.0" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 833 | 834 | [[package]] 835 | name = "either" 836 | version = "1.6.1" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 839 | 840 | [[package]] 841 | name = "encoding_rs" 842 | version = "0.8.28" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" 845 | dependencies = [ 846 | "cfg-if 1.0.0", 847 | ] 848 | 849 | [[package]] 850 | name = "enum-as-inner" 851 | version = "0.3.3" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" 854 | dependencies = [ 855 | "heck", 856 | "proc-macro2", 857 | "quote", 858 | "syn", 859 | ] 860 | 861 | [[package]] 862 | name = "env_logger" 863 | version = "0.7.1" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" 866 | dependencies = [ 867 | "atty", 868 | "humantime", 869 | "log", 870 | "regex", 871 | "termcolor", 872 | ] 873 | 874 | [[package]] 875 | name = "exr" 876 | version = "1.6.3" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" 879 | dependencies = [ 880 | "bit_field", 881 | "flume", 882 | "half", 883 | "lebe", 884 | "miniz_oxide 0.6.2", 885 | "rayon-core", 886 | "smallvec", 887 | "zune-inflate", 888 | ] 889 | 890 | [[package]] 891 | name = "fdeflate" 892 | version = "0.3.0" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" 895 | dependencies = [ 896 | "simd-adler32", 897 | ] 898 | 899 | [[package]] 900 | name = "ffprobe" 901 | version = "0.3.0" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "f439d57070a29c93e5bdf9f98b973360aa96b1b8c203793de54482f168fc216a" 904 | dependencies = [ 905 | "serde", 906 | "serde_json", 907 | ] 908 | 909 | [[package]] 910 | name = "firestorm" 911 | version = "0.4.6" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "31586bda1b136406162e381a3185a506cdfc1631708dd40cba2f6628d8634499" 914 | 915 | [[package]] 916 | name = "fixedbitset" 917 | version = "0.2.0" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" 920 | 921 | [[package]] 922 | name = "flate2" 923 | version = "1.0.22" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" 926 | dependencies = [ 927 | "cfg-if 1.0.0", 928 | "crc32fast", 929 | "libc", 930 | "miniz_oxide 0.4.4", 931 | ] 932 | 933 | [[package]] 934 | name = "flume" 935 | version = "0.10.14" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" 938 | dependencies = [ 939 | "futures-core", 940 | "futures-sink", 941 | "nanorand", 942 | "pin-project", 943 | "spin 0.9.8", 944 | ] 945 | 946 | [[package]] 947 | name = "fnv" 948 | version = "1.0.7" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 951 | 952 | [[package]] 953 | name = "foreign-types" 954 | version = "0.3.2" 955 | source = "registry+https://github.com/rust-lang/crates.io-index" 956 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 957 | dependencies = [ 958 | "foreign-types-shared", 959 | ] 960 | 961 | [[package]] 962 | name = "foreign-types-shared" 963 | version = "0.1.1" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 966 | 967 | [[package]] 968 | name = "form_urlencoded" 969 | version = "1.0.1" 970 | source = "registry+https://github.com/rust-lang/crates.io-index" 971 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 972 | dependencies = [ 973 | "matches", 974 | "percent-encoding", 975 | ] 976 | 977 | [[package]] 978 | name = "fuchsia-cprng" 979 | version = "0.1.1" 980 | source = "registry+https://github.com/rust-lang/crates.io-index" 981 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 982 | 983 | [[package]] 984 | name = "futures" 985 | version = "0.3.17" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" 988 | dependencies = [ 989 | "futures-channel", 990 | "futures-core", 991 | "futures-executor", 992 | "futures-io", 993 | "futures-sink", 994 | "futures-task", 995 | "futures-util", 996 | ] 997 | 998 | [[package]] 999 | name = "futures-channel" 1000 | version = "0.3.17" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" 1003 | dependencies = [ 1004 | "futures-core", 1005 | "futures-sink", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "futures-core" 1010 | version = "0.3.17" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" 1013 | 1014 | [[package]] 1015 | name = "futures-executor" 1016 | version = "0.3.17" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" 1019 | dependencies = [ 1020 | "futures-core", 1021 | "futures-task", 1022 | "futures-util", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "futures-io" 1027 | version = "0.3.17" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" 1030 | 1031 | [[package]] 1032 | name = "futures-macro" 1033 | version = "0.3.17" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" 1036 | dependencies = [ 1037 | "autocfg 1.0.1", 1038 | "proc-macro-hack", 1039 | "proc-macro2", 1040 | "quote", 1041 | "syn", 1042 | ] 1043 | 1044 | [[package]] 1045 | name = "futures-sink" 1046 | version = "0.3.17" 1047 | source = "registry+https://github.com/rust-lang/crates.io-index" 1048 | checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" 1049 | 1050 | [[package]] 1051 | name = "futures-task" 1052 | version = "0.3.17" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" 1055 | 1056 | [[package]] 1057 | name = "futures-util" 1058 | version = "0.3.17" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" 1061 | dependencies = [ 1062 | "autocfg 1.0.1", 1063 | "futures-channel", 1064 | "futures-core", 1065 | "futures-io", 1066 | "futures-macro", 1067 | "futures-sink", 1068 | "futures-task", 1069 | "memchr 2.4.1", 1070 | "pin-project-lite", 1071 | "pin-utils", 1072 | "proc-macro-hack", 1073 | "proc-macro-nested", 1074 | "slab", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "generic-array" 1079 | version = "0.14.4" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" 1082 | dependencies = [ 1083 | "typenum", 1084 | "version_check", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "getrandom" 1089 | version = "0.2.9" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 1092 | dependencies = [ 1093 | "cfg-if 1.0.0", 1094 | "js-sys", 1095 | "libc", 1096 | "wasi", 1097 | "wasm-bindgen", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "gif" 1102 | version = "0.12.0" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" 1105 | dependencies = [ 1106 | "color_quant", 1107 | "weezl", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "h2" 1112 | version = "0.3.4" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" 1115 | dependencies = [ 1116 | "bytes", 1117 | "fnv", 1118 | "futures-core", 1119 | "futures-sink", 1120 | "futures-util", 1121 | "http", 1122 | "indexmap", 1123 | "slab", 1124 | "tokio", 1125 | "tokio-util", 1126 | "tracing", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "half" 1131 | version = "2.2.1" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" 1134 | dependencies = [ 1135 | "crunchy", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "hashbrown" 1140 | version = "0.9.1" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 1143 | dependencies = [ 1144 | "ahash 0.4.7", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "hashbrown" 1149 | version = "0.11.2" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 1152 | 1153 | [[package]] 1154 | name = "heck" 1155 | version = "0.3.3" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 1158 | dependencies = [ 1159 | "unicode-segmentation", 1160 | ] 1161 | 1162 | [[package]] 1163 | name = "hermit-abi" 1164 | version = "0.1.19" 1165 | source = "registry+https://github.com/rust-lang/crates.io-index" 1166 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1167 | dependencies = [ 1168 | "libc", 1169 | ] 1170 | 1171 | [[package]] 1172 | name = "hex" 1173 | version = "0.4.3" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1176 | 1177 | [[package]] 1178 | name = "hmac" 1179 | version = "0.10.1" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" 1182 | dependencies = [ 1183 | "crypto-mac 0.10.1", 1184 | "digest", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "hmac" 1189 | version = "0.11.0" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" 1192 | dependencies = [ 1193 | "crypto-mac 0.11.1", 1194 | "digest", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "hostname" 1199 | version = "0.3.1" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" 1202 | dependencies = [ 1203 | "libc", 1204 | "match_cfg", 1205 | "winapi", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "http" 1210 | version = "0.2.4" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" 1213 | dependencies = [ 1214 | "bytes", 1215 | "fnv", 1216 | "itoa", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "http-body" 1221 | version = "0.4.3" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" 1224 | dependencies = [ 1225 | "bytes", 1226 | "http", 1227 | "pin-project-lite", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "http-range" 1232 | version = "0.1.4" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "eee9694f83d9b7c09682fdb32213682939507884e5bcf227be9aff5d644b90dc" 1235 | 1236 | [[package]] 1237 | name = "httparse" 1238 | version = "1.5.1" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" 1241 | 1242 | [[package]] 1243 | name = "httpdate" 1244 | version = "1.0.1" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" 1247 | 1248 | [[package]] 1249 | name = "humantime" 1250 | version = "1.3.0" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 1253 | dependencies = [ 1254 | "quick-error", 1255 | ] 1256 | 1257 | [[package]] 1258 | name = "hyper" 1259 | version = "0.14.12" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" 1262 | dependencies = [ 1263 | "bytes", 1264 | "futures-channel", 1265 | "futures-core", 1266 | "futures-util", 1267 | "h2", 1268 | "http", 1269 | "http-body", 1270 | "httparse", 1271 | "httpdate", 1272 | "itoa", 1273 | "pin-project-lite", 1274 | "socket2 0.4.2", 1275 | "tokio", 1276 | "tower-service", 1277 | "tracing", 1278 | "want", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "hyper-tls" 1283 | version = "0.5.0" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 1286 | dependencies = [ 1287 | "bytes", 1288 | "hyper", 1289 | "native-tls", 1290 | "tokio", 1291 | "tokio-native-tls", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "ident_case" 1296 | version = "1.0.1" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1299 | 1300 | [[package]] 1301 | name = "idna" 1302 | version = "0.2.3" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 1305 | dependencies = [ 1306 | "matches", 1307 | "unicode-bidi", 1308 | "unicode-normalization", 1309 | ] 1310 | 1311 | [[package]] 1312 | name = "image" 1313 | version = "0.24.6" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" 1316 | dependencies = [ 1317 | "bytemuck", 1318 | "byteorder", 1319 | "color_quant", 1320 | "exr", 1321 | "gif", 1322 | "jpeg-decoder", 1323 | "num-rational", 1324 | "num-traits", 1325 | "png", 1326 | "qoi", 1327 | "tiff", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "imagesize" 1332 | version = "0.9.0" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "00b3b62f4e783e38afa07b51eaaa789be2fba03dbe29a05a1a906eb64feb987d" 1335 | 1336 | [[package]] 1337 | name = "indexmap" 1338 | version = "1.7.0" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" 1341 | dependencies = [ 1342 | "autocfg 1.0.1", 1343 | "hashbrown 0.11.2", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "instant" 1348 | version = "0.1.10" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" 1351 | dependencies = [ 1352 | "cfg-if 1.0.0", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "ipconfig" 1357 | version = "0.2.2" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" 1360 | dependencies = [ 1361 | "socket2 0.3.19", 1362 | "widestring", 1363 | "winapi", 1364 | "winreg 0.6.2", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "ipnet" 1369 | version = "2.3.1" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" 1372 | 1373 | [[package]] 1374 | name = "itoa" 1375 | version = "0.4.8" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 1378 | 1379 | [[package]] 1380 | name = "jobserver" 1381 | version = "0.1.24" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" 1384 | dependencies = [ 1385 | "libc", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "jpeg-decoder" 1390 | version = "0.3.0" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" 1393 | dependencies = [ 1394 | "rayon", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "js-sys" 1399 | version = "0.3.55" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" 1402 | dependencies = [ 1403 | "wasm-bindgen", 1404 | ] 1405 | 1406 | [[package]] 1407 | name = "kamadak-exif" 1408 | version = "0.5.4" 1409 | source = "registry+https://github.com/rust-lang/crates.io-index" 1410 | checksum = "70494964492bf8e491eb3951c5d70c9627eb7100ede6cc56d748b9a3f302cfb6" 1411 | dependencies = [ 1412 | "mutate_once", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "language-tags" 1417 | version = "0.3.2" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1420 | 1421 | [[package]] 1422 | name = "lazy_static" 1423 | version = "1.4.0" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1426 | 1427 | [[package]] 1428 | name = "lebe" 1429 | version = "0.5.2" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" 1432 | 1433 | [[package]] 1434 | name = "libc" 1435 | version = "0.2.142" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" 1438 | 1439 | [[package]] 1440 | name = "libwebp-sys" 1441 | version = "0.4.2" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "439fd1885aa28937e7edcd68d2e793cb4a22f8733460d2519fbafd2b215672bf" 1444 | dependencies = [ 1445 | "cc", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "linked-hash-map" 1450 | version = "0.5.4" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" 1453 | 1454 | [[package]] 1455 | name = "local-channel" 1456 | version = "0.1.2" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "6246c68cf195087205a0512559c97e15eaf95198bf0e206d662092cdcb03fe9f" 1459 | dependencies = [ 1460 | "futures-core", 1461 | "futures-sink", 1462 | "futures-util", 1463 | "local-waker", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "local-waker" 1468 | version = "0.1.1" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "84f9a2d3e27ce99ce2c3aad0b09b1a7b916293ea9b2bf624c13fe646fadd8da4" 1471 | 1472 | [[package]] 1473 | name = "lock_api" 1474 | version = "0.3.4" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" 1477 | dependencies = [ 1478 | "scopeguard", 1479 | ] 1480 | 1481 | [[package]] 1482 | name = "lock_api" 1483 | version = "0.4.5" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" 1486 | dependencies = [ 1487 | "scopeguard", 1488 | ] 1489 | 1490 | [[package]] 1491 | name = "log" 1492 | version = "0.4.14" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 1495 | dependencies = [ 1496 | "cfg-if 1.0.0", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "lru-cache" 1501 | version = "0.1.2" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" 1504 | dependencies = [ 1505 | "linked-hash-map", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "match_cfg" 1510 | version = "0.1.0" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" 1513 | 1514 | [[package]] 1515 | name = "matches" 1516 | version = "0.1.9" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 1519 | 1520 | [[package]] 1521 | name = "maybe-async" 1522 | version = "0.2.6" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "6007f9dad048e0a224f27ca599d669fca8cfa0dac804725aab542b2eb032bce6" 1525 | dependencies = [ 1526 | "proc-macro2", 1527 | "quote", 1528 | "syn", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "md-5" 1533 | version = "0.9.1" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" 1536 | dependencies = [ 1537 | "block-buffer", 1538 | "digest", 1539 | "opaque-debug", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "md5" 1544 | version = "0.7.0" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" 1547 | 1548 | [[package]] 1549 | name = "memchr" 1550 | version = "1.0.2" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" 1553 | dependencies = [ 1554 | "libc", 1555 | ] 1556 | 1557 | [[package]] 1558 | name = "memchr" 1559 | version = "2.4.1" 1560 | source = "registry+https://github.com/rust-lang/crates.io-index" 1561 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 1562 | 1563 | [[package]] 1564 | name = "memoffset" 1565 | version = "0.6.4" 1566 | source = "registry+https://github.com/rust-lang/crates.io-index" 1567 | checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" 1568 | dependencies = [ 1569 | "autocfg 1.0.1", 1570 | ] 1571 | 1572 | [[package]] 1573 | name = "mime" 1574 | version = "0.3.16" 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" 1576 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 1577 | 1578 | [[package]] 1579 | name = "mime_guess" 1580 | version = "2.0.3" 1581 | source = "registry+https://github.com/rust-lang/crates.io-index" 1582 | checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" 1583 | dependencies = [ 1584 | "mime", 1585 | "unicase", 1586 | ] 1587 | 1588 | [[package]] 1589 | name = "minidom" 1590 | version = "0.13.0" 1591 | source = "registry+https://github.com/rust-lang/crates.io-index" 1592 | checksum = "332592c2149fc7dd40a64fc9ef6f0d65607284b474cef9817d1fc8c7e7b3608e" 1593 | dependencies = [ 1594 | "quick-xml", 1595 | ] 1596 | 1597 | [[package]] 1598 | name = "miniz_oxide" 1599 | version = "0.4.4" 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" 1601 | checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" 1602 | dependencies = [ 1603 | "adler", 1604 | "autocfg 1.0.1", 1605 | ] 1606 | 1607 | [[package]] 1608 | name = "miniz_oxide" 1609 | version = "0.6.2" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1612 | dependencies = [ 1613 | "adler", 1614 | ] 1615 | 1616 | [[package]] 1617 | name = "miniz_oxide" 1618 | version = "0.7.1" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1621 | dependencies = [ 1622 | "adler", 1623 | "simd-adler32", 1624 | ] 1625 | 1626 | [[package]] 1627 | name = "mio" 1628 | version = "0.7.13" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" 1631 | dependencies = [ 1632 | "libc", 1633 | "log", 1634 | "miow", 1635 | "ntapi", 1636 | "winapi", 1637 | ] 1638 | 1639 | [[package]] 1640 | name = "miow" 1641 | version = "0.3.7" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 1644 | dependencies = [ 1645 | "winapi", 1646 | ] 1647 | 1648 | [[package]] 1649 | name = "mongodb" 1650 | version = "2.0.0" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | checksum = "2b465d2f8add538efbaa3f22ae63be191b871ca511413405a59b8247cf2f6ef9" 1653 | dependencies = [ 1654 | "async-trait", 1655 | "base64", 1656 | "bitflags", 1657 | "bson", 1658 | "chrono", 1659 | "derivative", 1660 | "futures-core", 1661 | "futures-executor", 1662 | "futures-io", 1663 | "futures-util", 1664 | "hex", 1665 | "hmac 0.11.0", 1666 | "lazy_static", 1667 | "md-5", 1668 | "os_info", 1669 | "pbkdf2", 1670 | "percent-encoding", 1671 | "rand 0.8.4", 1672 | "rustls", 1673 | "serde", 1674 | "serde_bytes", 1675 | "serde_with", 1676 | "sha-1", 1677 | "sha2", 1678 | "socket2 0.4.2", 1679 | "stringprep", 1680 | "strsim", 1681 | "take_mut", 1682 | "thiserror", 1683 | "tokio", 1684 | "tokio-rustls", 1685 | "tokio-util", 1686 | "trust-dns-proto", 1687 | "trust-dns-resolver", 1688 | "typed-builder", 1689 | "uuid", 1690 | "version_check", 1691 | "webpki", 1692 | "webpki-roots", 1693 | ] 1694 | 1695 | [[package]] 1696 | name = "mutate_once" 1697 | version = "0.1.1" 1698 | source = "registry+https://github.com/rust-lang/crates.io-index" 1699 | checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" 1700 | 1701 | [[package]] 1702 | name = "nanoid" 1703 | version = "0.3.0" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "a6226bc4e142124cb44e309a37a04cd9bb10e740d8642855441d3b14808f635e" 1706 | dependencies = [ 1707 | "rand 0.6.5", 1708 | ] 1709 | 1710 | [[package]] 1711 | name = "nanorand" 1712 | version = "0.7.0" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" 1715 | dependencies = [ 1716 | "getrandom", 1717 | ] 1718 | 1719 | [[package]] 1720 | name = "native-tls" 1721 | version = "0.2.8" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" 1724 | dependencies = [ 1725 | "lazy_static", 1726 | "libc", 1727 | "log", 1728 | "openssl", 1729 | "openssl-probe", 1730 | "openssl-sys", 1731 | "schannel", 1732 | "security-framework", 1733 | "security-framework-sys", 1734 | "tempfile", 1735 | ] 1736 | 1737 | [[package]] 1738 | name = "nom" 1739 | version = "3.2.1" 1740 | source = "registry+https://github.com/rust-lang/crates.io-index" 1741 | checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" 1742 | dependencies = [ 1743 | "memchr 1.0.2", 1744 | ] 1745 | 1746 | [[package]] 1747 | name = "nom" 1748 | version = "4.1.1" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | checksum = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a" 1751 | dependencies = [ 1752 | "memchr 2.4.1", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "ntapi" 1757 | version = "0.3.6" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 1760 | dependencies = [ 1761 | "winapi", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "num-integer" 1766 | version = "0.1.44" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 1769 | dependencies = [ 1770 | "autocfg 1.0.1", 1771 | "num-traits", 1772 | ] 1773 | 1774 | [[package]] 1775 | name = "num-rational" 1776 | version = "0.4.1" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 1779 | dependencies = [ 1780 | "autocfg 1.0.1", 1781 | "num-integer", 1782 | "num-traits", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "num-traits" 1787 | version = "0.2.14" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1790 | dependencies = [ 1791 | "autocfg 1.0.1", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "num_cpus" 1796 | version = "1.13.0" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1799 | dependencies = [ 1800 | "hermit-abi", 1801 | "libc", 1802 | ] 1803 | 1804 | [[package]] 1805 | name = "num_threads" 1806 | version = "0.1.6" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1809 | dependencies = [ 1810 | "libc", 1811 | ] 1812 | 1813 | [[package]] 1814 | name = "once_cell" 1815 | version = "1.8.0" 1816 | source = "registry+https://github.com/rust-lang/crates.io-index" 1817 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 1818 | 1819 | [[package]] 1820 | name = "opaque-debug" 1821 | version = "0.3.0" 1822 | source = "registry+https://github.com/rust-lang/crates.io-index" 1823 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 1824 | 1825 | [[package]] 1826 | name = "openssl" 1827 | version = "0.10.36" 1828 | source = "registry+https://github.com/rust-lang/crates.io-index" 1829 | checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" 1830 | dependencies = [ 1831 | "bitflags", 1832 | "cfg-if 1.0.0", 1833 | "foreign-types", 1834 | "libc", 1835 | "once_cell", 1836 | "openssl-sys", 1837 | ] 1838 | 1839 | [[package]] 1840 | name = "openssl-probe" 1841 | version = "0.1.4" 1842 | source = "registry+https://github.com/rust-lang/crates.io-index" 1843 | checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" 1844 | 1845 | [[package]] 1846 | name = "openssl-sys" 1847 | version = "0.9.66" 1848 | source = "registry+https://github.com/rust-lang/crates.io-index" 1849 | checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" 1850 | dependencies = [ 1851 | "autocfg 1.0.1", 1852 | "cc", 1853 | "libc", 1854 | "pkg-config", 1855 | "vcpkg", 1856 | ] 1857 | 1858 | [[package]] 1859 | name = "ordered-multimap" 1860 | version = "0.3.1" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "1c672c7ad9ec066e428c00eb917124a06f08db19e2584de982cc34b1f4c12485" 1863 | dependencies = [ 1864 | "dlv-list", 1865 | "hashbrown 0.9.1", 1866 | ] 1867 | 1868 | [[package]] 1869 | name = "os_info" 1870 | version = "3.0.7" 1871 | source = "registry+https://github.com/rust-lang/crates.io-index" 1872 | checksum = "6ac91020bfed8cc3f8aa450d4c3b5fa1d3373fc091c8a92009f3b27749d5a227" 1873 | dependencies = [ 1874 | "log", 1875 | "winapi", 1876 | ] 1877 | 1878 | [[package]] 1879 | name = "parking_lot" 1880 | version = "0.10.2" 1881 | source = "registry+https://github.com/rust-lang/crates.io-index" 1882 | checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" 1883 | dependencies = [ 1884 | "lock_api 0.3.4", 1885 | "parking_lot_core 0.7.2", 1886 | ] 1887 | 1888 | [[package]] 1889 | name = "parking_lot" 1890 | version = "0.11.2" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1893 | dependencies = [ 1894 | "instant", 1895 | "lock_api 0.4.5", 1896 | "parking_lot_core 0.8.5", 1897 | ] 1898 | 1899 | [[package]] 1900 | name = "parking_lot_core" 1901 | version = "0.7.2" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" 1904 | dependencies = [ 1905 | "cfg-if 0.1.10", 1906 | "cloudabi", 1907 | "libc", 1908 | "redox_syscall 0.1.57", 1909 | "smallvec", 1910 | "winapi", 1911 | ] 1912 | 1913 | [[package]] 1914 | name = "parking_lot_core" 1915 | version = "0.8.5" 1916 | source = "registry+https://github.com/rust-lang/crates.io-index" 1917 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1918 | dependencies = [ 1919 | "cfg-if 1.0.0", 1920 | "instant", 1921 | "libc", 1922 | "redox_syscall 0.2.10", 1923 | "smallvec", 1924 | "winapi", 1925 | ] 1926 | 1927 | [[package]] 1928 | name = "paste" 1929 | version = "1.0.5" 1930 | source = "registry+https://github.com/rust-lang/crates.io-index" 1931 | checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" 1932 | 1933 | [[package]] 1934 | name = "pbkdf2" 1935 | version = "0.8.0" 1936 | source = "registry+https://github.com/rust-lang/crates.io-index" 1937 | checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" 1938 | dependencies = [ 1939 | "crypto-mac 0.11.1", 1940 | ] 1941 | 1942 | [[package]] 1943 | name = "percent-encoding" 1944 | version = "2.1.0" 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" 1946 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1947 | 1948 | [[package]] 1949 | name = "pest" 1950 | version = "2.1.3" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 1953 | dependencies = [ 1954 | "ucd-trie", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "petgraph" 1959 | version = "0.5.1" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" 1962 | dependencies = [ 1963 | "fixedbitset", 1964 | "indexmap", 1965 | ] 1966 | 1967 | [[package]] 1968 | name = "pin-project" 1969 | version = "1.0.8" 1970 | source = "registry+https://github.com/rust-lang/crates.io-index" 1971 | checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" 1972 | dependencies = [ 1973 | "pin-project-internal", 1974 | ] 1975 | 1976 | [[package]] 1977 | name = "pin-project-internal" 1978 | version = "1.0.8" 1979 | source = "registry+https://github.com/rust-lang/crates.io-index" 1980 | checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" 1981 | dependencies = [ 1982 | "proc-macro2", 1983 | "quote", 1984 | "syn", 1985 | ] 1986 | 1987 | [[package]] 1988 | name = "pin-project-lite" 1989 | version = "0.2.7" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" 1992 | 1993 | [[package]] 1994 | name = "pin-utils" 1995 | version = "0.1.0" 1996 | source = "registry+https://github.com/rust-lang/crates.io-index" 1997 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1998 | 1999 | [[package]] 2000 | name = "pkg-config" 2001 | version = "0.3.19" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" 2004 | 2005 | [[package]] 2006 | name = "png" 2007 | version = "0.17.8" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" 2010 | dependencies = [ 2011 | "bitflags", 2012 | "crc32fast", 2013 | "fdeflate", 2014 | "flate2", 2015 | "miniz_oxide 0.7.1", 2016 | ] 2017 | 2018 | [[package]] 2019 | name = "ppv-lite86" 2020 | version = "0.2.10" 2021 | source = "registry+https://github.com/rust-lang/crates.io-index" 2022 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 2023 | 2024 | [[package]] 2025 | name = "proc-macro-hack" 2026 | version = "0.5.19" 2027 | source = "registry+https://github.com/rust-lang/crates.io-index" 2028 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 2029 | 2030 | [[package]] 2031 | name = "proc-macro-nested" 2032 | version = "0.1.7" 2033 | source = "registry+https://github.com/rust-lang/crates.io-index" 2034 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 2035 | 2036 | [[package]] 2037 | name = "proc-macro2" 2038 | version = "1.0.29" 2039 | source = "registry+https://github.com/rust-lang/crates.io-index" 2040 | checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" 2041 | dependencies = [ 2042 | "unicode-xid", 2043 | ] 2044 | 2045 | [[package]] 2046 | name = "qoi" 2047 | version = "0.4.1" 2048 | source = "registry+https://github.com/rust-lang/crates.io-index" 2049 | checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" 2050 | dependencies = [ 2051 | "bytemuck", 2052 | ] 2053 | 2054 | [[package]] 2055 | name = "quick-error" 2056 | version = "1.2.3" 2057 | source = "registry+https://github.com/rust-lang/crates.io-index" 2058 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 2059 | 2060 | [[package]] 2061 | name = "quick-xml" 2062 | version = "0.20.0" 2063 | source = "registry+https://github.com/rust-lang/crates.io-index" 2064 | checksum = "26aab6b48e2590e4a64d1ed808749ba06257882b461d01ca71baeb747074a6dd" 2065 | dependencies = [ 2066 | "memchr 2.4.1", 2067 | ] 2068 | 2069 | [[package]] 2070 | name = "quote" 2071 | version = "1.0.9" 2072 | source = "registry+https://github.com/rust-lang/crates.io-index" 2073 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 2074 | dependencies = [ 2075 | "proc-macro2", 2076 | ] 2077 | 2078 | [[package]] 2079 | name = "rand" 2080 | version = "0.6.5" 2081 | source = "registry+https://github.com/rust-lang/crates.io-index" 2082 | checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 2083 | dependencies = [ 2084 | "autocfg 0.1.7", 2085 | "libc", 2086 | "rand_chacha 0.1.1", 2087 | "rand_core 0.4.2", 2088 | "rand_hc 0.1.0", 2089 | "rand_isaac", 2090 | "rand_jitter", 2091 | "rand_os", 2092 | "rand_pcg", 2093 | "rand_xorshift", 2094 | "winapi", 2095 | ] 2096 | 2097 | [[package]] 2098 | name = "rand" 2099 | version = "0.8.4" 2100 | source = "registry+https://github.com/rust-lang/crates.io-index" 2101 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" 2102 | dependencies = [ 2103 | "libc", 2104 | "rand_chacha 0.3.1", 2105 | "rand_core 0.6.3", 2106 | "rand_hc 0.3.1", 2107 | ] 2108 | 2109 | [[package]] 2110 | name = "rand_chacha" 2111 | version = "0.1.1" 2112 | source = "registry+https://github.com/rust-lang/crates.io-index" 2113 | checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 2114 | dependencies = [ 2115 | "autocfg 0.1.7", 2116 | "rand_core 0.3.1", 2117 | ] 2118 | 2119 | [[package]] 2120 | name = "rand_chacha" 2121 | version = "0.3.1" 2122 | source = "registry+https://github.com/rust-lang/crates.io-index" 2123 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2124 | dependencies = [ 2125 | "ppv-lite86", 2126 | "rand_core 0.6.3", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "rand_core" 2131 | version = "0.3.1" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 2134 | dependencies = [ 2135 | "rand_core 0.4.2", 2136 | ] 2137 | 2138 | [[package]] 2139 | name = "rand_core" 2140 | version = "0.4.2" 2141 | source = "registry+https://github.com/rust-lang/crates.io-index" 2142 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 2143 | 2144 | [[package]] 2145 | name = "rand_core" 2146 | version = "0.6.3" 2147 | source = "registry+https://github.com/rust-lang/crates.io-index" 2148 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 2149 | dependencies = [ 2150 | "getrandom", 2151 | ] 2152 | 2153 | [[package]] 2154 | name = "rand_hc" 2155 | version = "0.1.0" 2156 | source = "registry+https://github.com/rust-lang/crates.io-index" 2157 | checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 2158 | dependencies = [ 2159 | "rand_core 0.3.1", 2160 | ] 2161 | 2162 | [[package]] 2163 | name = "rand_hc" 2164 | version = "0.3.1" 2165 | source = "registry+https://github.com/rust-lang/crates.io-index" 2166 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" 2167 | dependencies = [ 2168 | "rand_core 0.6.3", 2169 | ] 2170 | 2171 | [[package]] 2172 | name = "rand_isaac" 2173 | version = "0.1.1" 2174 | source = "registry+https://github.com/rust-lang/crates.io-index" 2175 | checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 2176 | dependencies = [ 2177 | "rand_core 0.3.1", 2178 | ] 2179 | 2180 | [[package]] 2181 | name = "rand_jitter" 2182 | version = "0.1.4" 2183 | source = "registry+https://github.com/rust-lang/crates.io-index" 2184 | checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 2185 | dependencies = [ 2186 | "libc", 2187 | "rand_core 0.4.2", 2188 | "winapi", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "rand_os" 2193 | version = "0.1.3" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 2196 | dependencies = [ 2197 | "cloudabi", 2198 | "fuchsia-cprng", 2199 | "libc", 2200 | "rand_core 0.4.2", 2201 | "rdrand", 2202 | "winapi", 2203 | ] 2204 | 2205 | [[package]] 2206 | name = "rand_pcg" 2207 | version = "0.1.2" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 2210 | dependencies = [ 2211 | "autocfg 0.1.7", 2212 | "rand_core 0.4.2", 2213 | ] 2214 | 2215 | [[package]] 2216 | name = "rand_xorshift" 2217 | version = "0.1.1" 2218 | source = "registry+https://github.com/rust-lang/crates.io-index" 2219 | checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 2220 | dependencies = [ 2221 | "rand_core 0.3.1", 2222 | ] 2223 | 2224 | [[package]] 2225 | name = "rayon" 2226 | version = "1.5.1" 2227 | source = "registry+https://github.com/rust-lang/crates.io-index" 2228 | checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" 2229 | dependencies = [ 2230 | "autocfg 1.0.1", 2231 | "crossbeam-deque", 2232 | "either", 2233 | "rayon-core", 2234 | ] 2235 | 2236 | [[package]] 2237 | name = "rayon-core" 2238 | version = "1.11.0" 2239 | source = "registry+https://github.com/rust-lang/crates.io-index" 2240 | checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 2241 | dependencies = [ 2242 | "crossbeam-channel", 2243 | "crossbeam-deque", 2244 | "crossbeam-utils", 2245 | "num_cpus", 2246 | ] 2247 | 2248 | [[package]] 2249 | name = "rdrand" 2250 | version = "0.4.0" 2251 | source = "registry+https://github.com/rust-lang/crates.io-index" 2252 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 2253 | dependencies = [ 2254 | "rand_core 0.3.1", 2255 | ] 2256 | 2257 | [[package]] 2258 | name = "redox_syscall" 2259 | version = "0.1.57" 2260 | source = "registry+https://github.com/rust-lang/crates.io-index" 2261 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 2262 | 2263 | [[package]] 2264 | name = "redox_syscall" 2265 | version = "0.2.10" 2266 | source = "registry+https://github.com/rust-lang/crates.io-index" 2267 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" 2268 | dependencies = [ 2269 | "bitflags", 2270 | ] 2271 | 2272 | [[package]] 2273 | name = "redox_users" 2274 | version = "0.4.0" 2275 | source = "registry+https://github.com/rust-lang/crates.io-index" 2276 | checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" 2277 | dependencies = [ 2278 | "getrandom", 2279 | "redox_syscall 0.2.10", 2280 | ] 2281 | 2282 | [[package]] 2283 | name = "regex" 2284 | version = "1.5.4" 2285 | source = "registry+https://github.com/rust-lang/crates.io-index" 2286 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 2287 | dependencies = [ 2288 | "aho-corasick", 2289 | "memchr 2.4.1", 2290 | "regex-syntax", 2291 | ] 2292 | 2293 | [[package]] 2294 | name = "regex-syntax" 2295 | version = "0.6.25" 2296 | source = "registry+https://github.com/rust-lang/crates.io-index" 2297 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 2298 | 2299 | [[package]] 2300 | name = "remove_dir_all" 2301 | version = "0.5.3" 2302 | source = "registry+https://github.com/rust-lang/crates.io-index" 2303 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 2304 | dependencies = [ 2305 | "winapi", 2306 | ] 2307 | 2308 | [[package]] 2309 | name = "reqwest" 2310 | version = "0.11.4" 2311 | source = "registry+https://github.com/rust-lang/crates.io-index" 2312 | checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" 2313 | dependencies = [ 2314 | "base64", 2315 | "bytes", 2316 | "encoding_rs", 2317 | "futures-core", 2318 | "futures-util", 2319 | "http", 2320 | "http-body", 2321 | "hyper", 2322 | "hyper-tls", 2323 | "ipnet", 2324 | "js-sys", 2325 | "lazy_static", 2326 | "log", 2327 | "mime", 2328 | "native-tls", 2329 | "percent-encoding", 2330 | "pin-project-lite", 2331 | "serde", 2332 | "serde_json", 2333 | "serde_urlencoded", 2334 | "tokio", 2335 | "tokio-native-tls", 2336 | "url", 2337 | "wasm-bindgen", 2338 | "wasm-bindgen-futures", 2339 | "web-sys", 2340 | "winreg 0.7.0", 2341 | ] 2342 | 2343 | [[package]] 2344 | name = "resolv-conf" 2345 | version = "0.7.0" 2346 | source = "registry+https://github.com/rust-lang/crates.io-index" 2347 | checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" 2348 | dependencies = [ 2349 | "hostname", 2350 | "quick-error", 2351 | ] 2352 | 2353 | [[package]] 2354 | name = "revolt_clamav-client" 2355 | version = "0.1.5" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "3d719e9fe861e2e05cbf01fd82d310fdeb2160c74fee21689a5c223eeb65cea8" 2358 | 2359 | [[package]] 2360 | name = "ring" 2361 | version = "0.16.20" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 2364 | dependencies = [ 2365 | "cc", 2366 | "libc", 2367 | "once_cell", 2368 | "spin 0.5.2", 2369 | "untrusted", 2370 | "web-sys", 2371 | "winapi", 2372 | ] 2373 | 2374 | [[package]] 2375 | name = "rust-ini" 2376 | version = "0.16.1" 2377 | source = "registry+https://github.com/rust-lang/crates.io-index" 2378 | checksum = "55b134767a87e0b086f73a4ce569ac9ce7d202f39c8eab6caa266e2617e73ac6" 2379 | dependencies = [ 2380 | "cfg-if 0.1.10", 2381 | "ordered-multimap", 2382 | ] 2383 | 2384 | [[package]] 2385 | name = "rust-s3" 2386 | version = "0.27.0-rc4" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "5c93272c1d654d492f8ab30b94cd43d98f2700b1db55b2576aff7712ce40e3ef" 2389 | dependencies = [ 2390 | "anyhow", 2391 | "async-trait", 2392 | "aws-creds", 2393 | "aws-region", 2394 | "base64", 2395 | "cfg-if 1.0.0", 2396 | "chrono", 2397 | "futures", 2398 | "hex", 2399 | "hmac 0.10.1", 2400 | "http", 2401 | "log", 2402 | "maybe-async", 2403 | "md5", 2404 | "minidom", 2405 | "percent-encoding", 2406 | "reqwest", 2407 | "serde", 2408 | "serde-xml-rs", 2409 | "serde_derive", 2410 | "sha2", 2411 | "tokio", 2412 | "tokio-stream", 2413 | "url", 2414 | ] 2415 | 2416 | [[package]] 2417 | name = "rustc_version" 2418 | version = "0.2.3" 2419 | source = "registry+https://github.com/rust-lang/crates.io-index" 2420 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 2421 | dependencies = [ 2422 | "semver 0.9.0", 2423 | ] 2424 | 2425 | [[package]] 2426 | name = "rustc_version" 2427 | version = "0.3.3" 2428 | source = "registry+https://github.com/rust-lang/crates.io-index" 2429 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" 2430 | dependencies = [ 2431 | "semver 0.11.0", 2432 | ] 2433 | 2434 | [[package]] 2435 | name = "rustls" 2436 | version = "0.19.1" 2437 | source = "registry+https://github.com/rust-lang/crates.io-index" 2438 | checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" 2439 | dependencies = [ 2440 | "base64", 2441 | "log", 2442 | "ring", 2443 | "sct", 2444 | "webpki", 2445 | ] 2446 | 2447 | [[package]] 2448 | name = "rustversion" 2449 | version = "1.0.5" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" 2452 | 2453 | [[package]] 2454 | name = "ryu" 2455 | version = "1.0.5" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 2458 | 2459 | [[package]] 2460 | name = "sanitize-filename" 2461 | version = "0.4.0" 2462 | source = "registry+https://github.com/rust-lang/crates.io-index" 2463 | checksum = "08c502bdb638f1396509467cb0580ef3b29aa2a45c5d43e5d84928241280296c" 2464 | dependencies = [ 2465 | "lazy_static", 2466 | "regex", 2467 | ] 2468 | 2469 | [[package]] 2470 | name = "schannel" 2471 | version = "0.1.19" 2472 | source = "registry+https://github.com/rust-lang/crates.io-index" 2473 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 2474 | dependencies = [ 2475 | "lazy_static", 2476 | "winapi", 2477 | ] 2478 | 2479 | [[package]] 2480 | name = "scopeguard" 2481 | version = "1.1.0" 2482 | source = "registry+https://github.com/rust-lang/crates.io-index" 2483 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2484 | 2485 | [[package]] 2486 | name = "sct" 2487 | version = "0.6.1" 2488 | source = "registry+https://github.com/rust-lang/crates.io-index" 2489 | checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" 2490 | dependencies = [ 2491 | "ring", 2492 | "untrusted", 2493 | ] 2494 | 2495 | [[package]] 2496 | name = "security-framework" 2497 | version = "2.4.2" 2498 | source = "registry+https://github.com/rust-lang/crates.io-index" 2499 | checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" 2500 | dependencies = [ 2501 | "bitflags", 2502 | "core-foundation", 2503 | "core-foundation-sys", 2504 | "libc", 2505 | "security-framework-sys", 2506 | ] 2507 | 2508 | [[package]] 2509 | name = "security-framework-sys" 2510 | version = "2.4.2" 2511 | source = "registry+https://github.com/rust-lang/crates.io-index" 2512 | checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" 2513 | dependencies = [ 2514 | "core-foundation-sys", 2515 | "libc", 2516 | ] 2517 | 2518 | [[package]] 2519 | name = "semver" 2520 | version = "0.9.0" 2521 | source = "registry+https://github.com/rust-lang/crates.io-index" 2522 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2523 | dependencies = [ 2524 | "semver-parser 0.7.0", 2525 | ] 2526 | 2527 | [[package]] 2528 | name = "semver" 2529 | version = "0.11.0" 2530 | source = "registry+https://github.com/rust-lang/crates.io-index" 2531 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" 2532 | dependencies = [ 2533 | "semver-parser 0.10.2", 2534 | ] 2535 | 2536 | [[package]] 2537 | name = "semver-parser" 2538 | version = "0.7.0" 2539 | source = "registry+https://github.com/rust-lang/crates.io-index" 2540 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2541 | 2542 | [[package]] 2543 | name = "semver-parser" 2544 | version = "0.10.2" 2545 | source = "registry+https://github.com/rust-lang/crates.io-index" 2546 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" 2547 | dependencies = [ 2548 | "pest", 2549 | ] 2550 | 2551 | [[package]] 2552 | name = "serde" 2553 | version = "1.0.130" 2554 | source = "registry+https://github.com/rust-lang/crates.io-index" 2555 | checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" 2556 | dependencies = [ 2557 | "serde_derive", 2558 | ] 2559 | 2560 | [[package]] 2561 | name = "serde-xml-rs" 2562 | version = "0.4.1" 2563 | source = "registry+https://github.com/rust-lang/crates.io-index" 2564 | checksum = "f0bf1ba0696ccf0872866277143ff1fd14d22eec235d2b23702f95e6660f7dfa" 2565 | dependencies = [ 2566 | "log", 2567 | "serde", 2568 | "thiserror", 2569 | "xml-rs", 2570 | ] 2571 | 2572 | [[package]] 2573 | name = "serde_bytes" 2574 | version = "0.11.5" 2575 | source = "registry+https://github.com/rust-lang/crates.io-index" 2576 | checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" 2577 | dependencies = [ 2578 | "serde", 2579 | ] 2580 | 2581 | [[package]] 2582 | name = "serde_derive" 2583 | version = "1.0.130" 2584 | source = "registry+https://github.com/rust-lang/crates.io-index" 2585 | checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" 2586 | dependencies = [ 2587 | "proc-macro2", 2588 | "quote", 2589 | "syn", 2590 | ] 2591 | 2592 | [[package]] 2593 | name = "serde_json" 2594 | version = "1.0.68" 2595 | source = "registry+https://github.com/rust-lang/crates.io-index" 2596 | checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" 2597 | dependencies = [ 2598 | "indexmap", 2599 | "itoa", 2600 | "ryu", 2601 | "serde", 2602 | ] 2603 | 2604 | [[package]] 2605 | name = "serde_urlencoded" 2606 | version = "0.7.0" 2607 | source = "registry+https://github.com/rust-lang/crates.io-index" 2608 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 2609 | dependencies = [ 2610 | "form_urlencoded", 2611 | "itoa", 2612 | "ryu", 2613 | "serde", 2614 | ] 2615 | 2616 | [[package]] 2617 | name = "serde_with" 2618 | version = "1.10.0" 2619 | source = "registry+https://github.com/rust-lang/crates.io-index" 2620 | checksum = "062b87e45d8f26714eacfaef0ed9a583e2bfd50ebd96bdd3c200733bd5758e2c" 2621 | dependencies = [ 2622 | "rustversion", 2623 | "serde", 2624 | "serde_with_macros", 2625 | ] 2626 | 2627 | [[package]] 2628 | name = "serde_with_macros" 2629 | version = "1.5.0" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "98c1fcca18d55d1763e1c16873c4bde0ac3ef75179a28c7b372917e0494625be" 2632 | dependencies = [ 2633 | "darling", 2634 | "proc-macro2", 2635 | "quote", 2636 | "syn", 2637 | ] 2638 | 2639 | [[package]] 2640 | name = "sha-1" 2641 | version = "0.9.8" 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" 2643 | checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" 2644 | dependencies = [ 2645 | "block-buffer", 2646 | "cfg-if 1.0.0", 2647 | "cpufeatures", 2648 | "digest", 2649 | "opaque-debug", 2650 | ] 2651 | 2652 | [[package]] 2653 | name = "sha1" 2654 | version = "0.6.0" 2655 | source = "registry+https://github.com/rust-lang/crates.io-index" 2656 | checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" 2657 | 2658 | [[package]] 2659 | name = "sha2" 2660 | version = "0.9.8" 2661 | source = "registry+https://github.com/rust-lang/crates.io-index" 2662 | checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" 2663 | dependencies = [ 2664 | "block-buffer", 2665 | "cfg-if 1.0.0", 2666 | "cpufeatures", 2667 | "digest", 2668 | "opaque-debug", 2669 | ] 2670 | 2671 | [[package]] 2672 | name = "signal-hook-registry" 2673 | version = "1.4.0" 2674 | source = "registry+https://github.com/rust-lang/crates.io-index" 2675 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 2676 | dependencies = [ 2677 | "libc", 2678 | ] 2679 | 2680 | [[package]] 2681 | name = "simd-adler32" 2682 | version = "0.3.5" 2683 | source = "registry+https://github.com/rust-lang/crates.io-index" 2684 | checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" 2685 | 2686 | [[package]] 2687 | name = "slab" 2688 | version = "0.4.4" 2689 | source = "registry+https://github.com/rust-lang/crates.io-index" 2690 | checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" 2691 | 2692 | [[package]] 2693 | name = "smallvec" 2694 | version = "1.10.0" 2695 | source = "registry+https://github.com/rust-lang/crates.io-index" 2696 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 2697 | 2698 | [[package]] 2699 | name = "socket2" 2700 | version = "0.3.19" 2701 | source = "registry+https://github.com/rust-lang/crates.io-index" 2702 | checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" 2703 | dependencies = [ 2704 | "cfg-if 1.0.0", 2705 | "libc", 2706 | "winapi", 2707 | ] 2708 | 2709 | [[package]] 2710 | name = "socket2" 2711 | version = "0.4.2" 2712 | source = "registry+https://github.com/rust-lang/crates.io-index" 2713 | checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" 2714 | dependencies = [ 2715 | "libc", 2716 | "winapi", 2717 | ] 2718 | 2719 | [[package]] 2720 | name = "spin" 2721 | version = "0.5.2" 2722 | source = "registry+https://github.com/rust-lang/crates.io-index" 2723 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2724 | 2725 | [[package]] 2726 | name = "spin" 2727 | version = "0.9.8" 2728 | source = "registry+https://github.com/rust-lang/crates.io-index" 2729 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2730 | dependencies = [ 2731 | "lock_api 0.4.5", 2732 | ] 2733 | 2734 | [[package]] 2735 | name = "standback" 2736 | version = "0.2.17" 2737 | source = "registry+https://github.com/rust-lang/crates.io-index" 2738 | checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 2739 | dependencies = [ 2740 | "version_check", 2741 | ] 2742 | 2743 | [[package]] 2744 | name = "stdweb" 2745 | version = "0.4.20" 2746 | source = "registry+https://github.com/rust-lang/crates.io-index" 2747 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 2748 | dependencies = [ 2749 | "discard", 2750 | "rustc_version 0.2.3", 2751 | "stdweb-derive", 2752 | "stdweb-internal-macros", 2753 | "stdweb-internal-runtime", 2754 | "wasm-bindgen", 2755 | ] 2756 | 2757 | [[package]] 2758 | name = "stdweb-derive" 2759 | version = "0.5.3" 2760 | source = "registry+https://github.com/rust-lang/crates.io-index" 2761 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 2762 | dependencies = [ 2763 | "proc-macro2", 2764 | "quote", 2765 | "serde", 2766 | "serde_derive", 2767 | "syn", 2768 | ] 2769 | 2770 | [[package]] 2771 | name = "stdweb-internal-macros" 2772 | version = "0.2.9" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 2775 | dependencies = [ 2776 | "base-x", 2777 | "proc-macro2", 2778 | "quote", 2779 | "serde", 2780 | "serde_derive", 2781 | "serde_json", 2782 | "sha1", 2783 | "syn", 2784 | ] 2785 | 2786 | [[package]] 2787 | name = "stdweb-internal-runtime" 2788 | version = "0.1.5" 2789 | source = "registry+https://github.com/rust-lang/crates.io-index" 2790 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 2791 | 2792 | [[package]] 2793 | name = "stringprep" 2794 | version = "0.1.2" 2795 | source = "registry+https://github.com/rust-lang/crates.io-index" 2796 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 2797 | dependencies = [ 2798 | "unicode-bidi", 2799 | "unicode-normalization", 2800 | ] 2801 | 2802 | [[package]] 2803 | name = "strsim" 2804 | version = "0.10.0" 2805 | source = "registry+https://github.com/rust-lang/crates.io-index" 2806 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 2807 | 2808 | [[package]] 2809 | name = "subtle" 2810 | version = "2.4.1" 2811 | source = "registry+https://github.com/rust-lang/crates.io-index" 2812 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2813 | 2814 | [[package]] 2815 | name = "syn" 2816 | version = "1.0.76" 2817 | source = "registry+https://github.com/rust-lang/crates.io-index" 2818 | checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" 2819 | dependencies = [ 2820 | "proc-macro2", 2821 | "quote", 2822 | "unicode-xid", 2823 | ] 2824 | 2825 | [[package]] 2826 | name = "take_mut" 2827 | version = "0.2.2" 2828 | source = "registry+https://github.com/rust-lang/crates.io-index" 2829 | checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" 2830 | 2831 | [[package]] 2832 | name = "tempfile" 2833 | version = "3.2.0" 2834 | source = "registry+https://github.com/rust-lang/crates.io-index" 2835 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 2836 | dependencies = [ 2837 | "cfg-if 1.0.0", 2838 | "libc", 2839 | "rand 0.8.4", 2840 | "redox_syscall 0.2.10", 2841 | "remove_dir_all", 2842 | "winapi", 2843 | ] 2844 | 2845 | [[package]] 2846 | name = "termcolor" 2847 | version = "1.1.2" 2848 | source = "registry+https://github.com/rust-lang/crates.io-index" 2849 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 2850 | dependencies = [ 2851 | "winapi-util", 2852 | ] 2853 | 2854 | [[package]] 2855 | name = "thiserror" 2856 | version = "1.0.29" 2857 | source = "registry+https://github.com/rust-lang/crates.io-index" 2858 | checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" 2859 | dependencies = [ 2860 | "thiserror-impl", 2861 | ] 2862 | 2863 | [[package]] 2864 | name = "thiserror-impl" 2865 | version = "1.0.29" 2866 | source = "registry+https://github.com/rust-lang/crates.io-index" 2867 | checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" 2868 | dependencies = [ 2869 | "proc-macro2", 2870 | "quote", 2871 | "syn", 2872 | ] 2873 | 2874 | [[package]] 2875 | name = "tiff" 2876 | version = "0.8.1" 2877 | source = "registry+https://github.com/rust-lang/crates.io-index" 2878 | checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" 2879 | dependencies = [ 2880 | "flate2", 2881 | "jpeg-decoder", 2882 | "weezl", 2883 | ] 2884 | 2885 | [[package]] 2886 | name = "time" 2887 | version = "0.1.43" 2888 | source = "registry+https://github.com/rust-lang/crates.io-index" 2889 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 2890 | dependencies = [ 2891 | "libc", 2892 | "winapi", 2893 | ] 2894 | 2895 | [[package]] 2896 | name = "time" 2897 | version = "0.2.27" 2898 | source = "registry+https://github.com/rust-lang/crates.io-index" 2899 | checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 2900 | dependencies = [ 2901 | "const_fn", 2902 | "libc", 2903 | "standback", 2904 | "stdweb", 2905 | "time-macros", 2906 | "version_check", 2907 | "winapi", 2908 | ] 2909 | 2910 | [[package]] 2911 | name = "time" 2912 | version = "0.3.11" 2913 | source = "registry+https://github.com/rust-lang/crates.io-index" 2914 | checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" 2915 | dependencies = [ 2916 | "libc", 2917 | "num_threads", 2918 | ] 2919 | 2920 | [[package]] 2921 | name = "time-macros" 2922 | version = "0.1.1" 2923 | source = "registry+https://github.com/rust-lang/crates.io-index" 2924 | checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 2925 | dependencies = [ 2926 | "proc-macro-hack", 2927 | "time-macros-impl", 2928 | ] 2929 | 2930 | [[package]] 2931 | name = "time-macros-impl" 2932 | version = "0.1.2" 2933 | source = "registry+https://github.com/rust-lang/crates.io-index" 2934 | checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 2935 | dependencies = [ 2936 | "proc-macro-hack", 2937 | "proc-macro2", 2938 | "quote", 2939 | "standback", 2940 | "syn", 2941 | ] 2942 | 2943 | [[package]] 2944 | name = "tinyvec" 2945 | version = "1.4.0" 2946 | source = "registry+https://github.com/rust-lang/crates.io-index" 2947 | checksum = "5241dd6f21443a3606b432718b166d3cedc962fd4b8bea54a8bc7f514ebda986" 2948 | dependencies = [ 2949 | "tinyvec_macros", 2950 | ] 2951 | 2952 | [[package]] 2953 | name = "tinyvec_macros" 2954 | version = "0.1.0" 2955 | source = "registry+https://github.com/rust-lang/crates.io-index" 2956 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2957 | 2958 | [[package]] 2959 | name = "tokio" 2960 | version = "1.11.0" 2961 | source = "registry+https://github.com/rust-lang/crates.io-index" 2962 | checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" 2963 | dependencies = [ 2964 | "autocfg 1.0.1", 2965 | "bytes", 2966 | "libc", 2967 | "memchr 2.4.1", 2968 | "mio", 2969 | "num_cpus", 2970 | "once_cell", 2971 | "parking_lot 0.11.2", 2972 | "pin-project-lite", 2973 | "signal-hook-registry", 2974 | "tokio-macros", 2975 | "winapi", 2976 | ] 2977 | 2978 | [[package]] 2979 | name = "tokio-cron-scheduler" 2980 | version = "0.2.3" 2981 | source = "registry+https://github.com/rust-lang/crates.io-index" 2982 | checksum = "5b2c664a1a2c807bb7753c535341089c05b6a5421b7c1956e0226862c069f0b2" 2983 | dependencies = [ 2984 | "chrono", 2985 | "cron", 2986 | "tokio", 2987 | "uuid", 2988 | ] 2989 | 2990 | [[package]] 2991 | name = "tokio-macros" 2992 | version = "1.3.0" 2993 | source = "registry+https://github.com/rust-lang/crates.io-index" 2994 | checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" 2995 | dependencies = [ 2996 | "proc-macro2", 2997 | "quote", 2998 | "syn", 2999 | ] 3000 | 3001 | [[package]] 3002 | name = "tokio-native-tls" 3003 | version = "0.3.0" 3004 | source = "registry+https://github.com/rust-lang/crates.io-index" 3005 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 3006 | dependencies = [ 3007 | "native-tls", 3008 | "tokio", 3009 | ] 3010 | 3011 | [[package]] 3012 | name = "tokio-rustls" 3013 | version = "0.22.0" 3014 | source = "registry+https://github.com/rust-lang/crates.io-index" 3015 | checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" 3016 | dependencies = [ 3017 | "rustls", 3018 | "tokio", 3019 | "webpki", 3020 | ] 3021 | 3022 | [[package]] 3023 | name = "tokio-stream" 3024 | version = "0.1.7" 3025 | source = "registry+https://github.com/rust-lang/crates.io-index" 3026 | checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" 3027 | dependencies = [ 3028 | "futures-core", 3029 | "pin-project-lite", 3030 | "tokio", 3031 | ] 3032 | 3033 | [[package]] 3034 | name = "tokio-util" 3035 | version = "0.6.8" 3036 | source = "registry+https://github.com/rust-lang/crates.io-index" 3037 | checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" 3038 | dependencies = [ 3039 | "bytes", 3040 | "futures-core", 3041 | "futures-sink", 3042 | "log", 3043 | "pin-project-lite", 3044 | "tokio", 3045 | ] 3046 | 3047 | [[package]] 3048 | name = "toml" 3049 | version = "0.5.8" 3050 | source = "registry+https://github.com/rust-lang/crates.io-index" 3051 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 3052 | dependencies = [ 3053 | "serde", 3054 | ] 3055 | 3056 | [[package]] 3057 | name = "tower-service" 3058 | version = "0.3.1" 3059 | source = "registry+https://github.com/rust-lang/crates.io-index" 3060 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 3061 | 3062 | [[package]] 3063 | name = "tracing" 3064 | version = "0.1.27" 3065 | source = "registry+https://github.com/rust-lang/crates.io-index" 3066 | checksum = "c2ba9ab62b7d6497a8638dfda5e5c4fb3b2d5a7fca4118f2b96151c8ef1a437e" 3067 | dependencies = [ 3068 | "cfg-if 1.0.0", 3069 | "pin-project-lite", 3070 | "tracing-core", 3071 | ] 3072 | 3073 | [[package]] 3074 | name = "tracing-core" 3075 | version = "0.1.20" 3076 | source = "registry+https://github.com/rust-lang/crates.io-index" 3077 | checksum = "46125608c26121c81b0c6d693eab5a420e416da7e43c426d2e8f7df8da8a3acf" 3078 | dependencies = [ 3079 | "lazy_static", 3080 | ] 3081 | 3082 | [[package]] 3083 | name = "tree_magic" 3084 | version = "0.2.3" 3085 | source = "registry+https://github.com/rust-lang/crates.io-index" 3086 | checksum = "b1d99367ce3e553a84738f73bd626ccca541ef90ae757fdcdc4cbe728e6cb629" 3087 | dependencies = [ 3088 | "fnv", 3089 | "lazy_static", 3090 | "nom 3.2.1", 3091 | "parking_lot 0.10.2", 3092 | "petgraph", 3093 | ] 3094 | 3095 | [[package]] 3096 | name = "trust-dns-proto" 3097 | version = "0.20.3" 3098 | source = "registry+https://github.com/rust-lang/crates.io-index" 3099 | checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4" 3100 | dependencies = [ 3101 | "async-trait", 3102 | "cfg-if 1.0.0", 3103 | "data-encoding", 3104 | "enum-as-inner", 3105 | "futures-channel", 3106 | "futures-io", 3107 | "futures-util", 3108 | "idna", 3109 | "ipnet", 3110 | "lazy_static", 3111 | "log", 3112 | "rand 0.8.4", 3113 | "smallvec", 3114 | "thiserror", 3115 | "tinyvec", 3116 | "tokio", 3117 | "url", 3118 | ] 3119 | 3120 | [[package]] 3121 | name = "trust-dns-resolver" 3122 | version = "0.20.3" 3123 | source = "registry+https://github.com/rust-lang/crates.io-index" 3124 | checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770" 3125 | dependencies = [ 3126 | "cfg-if 1.0.0", 3127 | "futures-util", 3128 | "ipconfig", 3129 | "lazy_static", 3130 | "log", 3131 | "lru-cache", 3132 | "parking_lot 0.11.2", 3133 | "resolv-conf", 3134 | "smallvec", 3135 | "thiserror", 3136 | "tokio", 3137 | "trust-dns-proto", 3138 | ] 3139 | 3140 | [[package]] 3141 | name = "try-lock" 3142 | version = "0.2.3" 3143 | source = "registry+https://github.com/rust-lang/crates.io-index" 3144 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 3145 | 3146 | [[package]] 3147 | name = "twoway" 3148 | version = "0.2.2" 3149 | source = "registry+https://github.com/rust-lang/crates.io-index" 3150 | checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" 3151 | dependencies = [ 3152 | "memchr 2.4.1", 3153 | "unchecked-index", 3154 | ] 3155 | 3156 | [[package]] 3157 | name = "typed-builder" 3158 | version = "0.9.1" 3159 | source = "registry+https://github.com/rust-lang/crates.io-index" 3160 | checksum = "a46ee5bd706ff79131be9c94e7edcb82b703c487766a114434e5790361cf08c5" 3161 | dependencies = [ 3162 | "proc-macro2", 3163 | "quote", 3164 | "syn", 3165 | ] 3166 | 3167 | [[package]] 3168 | name = "typenum" 3169 | version = "1.14.0" 3170 | source = "registry+https://github.com/rust-lang/crates.io-index" 3171 | checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" 3172 | 3173 | [[package]] 3174 | name = "ucd-trie" 3175 | version = "0.1.3" 3176 | source = "registry+https://github.com/rust-lang/crates.io-index" 3177 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 3178 | 3179 | [[package]] 3180 | name = "ulid" 3181 | version = "0.6.0" 3182 | source = "registry+https://github.com/rust-lang/crates.io-index" 3183 | checksum = "3be932d774bfad49722da2c4915ac7cc77b77dd223890739a0240de2b2a15957" 3184 | dependencies = [ 3185 | "rand 0.8.4", 3186 | "time 0.3.11", 3187 | ] 3188 | 3189 | [[package]] 3190 | name = "unchecked-index" 3191 | version = "0.2.2" 3192 | source = "registry+https://github.com/rust-lang/crates.io-index" 3193 | checksum = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" 3194 | 3195 | [[package]] 3196 | name = "unicase" 3197 | version = "2.6.0" 3198 | source = "registry+https://github.com/rust-lang/crates.io-index" 3199 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 3200 | dependencies = [ 3201 | "version_check", 3202 | ] 3203 | 3204 | [[package]] 3205 | name = "unicode-bidi" 3206 | version = "0.3.6" 3207 | source = "registry+https://github.com/rust-lang/crates.io-index" 3208 | checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" 3209 | 3210 | [[package]] 3211 | name = "unicode-normalization" 3212 | version = "0.1.19" 3213 | source = "registry+https://github.com/rust-lang/crates.io-index" 3214 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 3215 | dependencies = [ 3216 | "tinyvec", 3217 | ] 3218 | 3219 | [[package]] 3220 | name = "unicode-segmentation" 3221 | version = "1.8.0" 3222 | source = "registry+https://github.com/rust-lang/crates.io-index" 3223 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 3224 | 3225 | [[package]] 3226 | name = "unicode-xid" 3227 | version = "0.2.2" 3228 | source = "registry+https://github.com/rust-lang/crates.io-index" 3229 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 3230 | 3231 | [[package]] 3232 | name = "untrusted" 3233 | version = "0.7.1" 3234 | source = "registry+https://github.com/rust-lang/crates.io-index" 3235 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 3236 | 3237 | [[package]] 3238 | name = "url" 3239 | version = "2.2.2" 3240 | source = "registry+https://github.com/rust-lang/crates.io-index" 3241 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 3242 | dependencies = [ 3243 | "form_urlencoded", 3244 | "idna", 3245 | "matches", 3246 | "percent-encoding", 3247 | ] 3248 | 3249 | [[package]] 3250 | name = "uuid" 3251 | version = "0.8.2" 3252 | source = "registry+https://github.com/rust-lang/crates.io-index" 3253 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" 3254 | dependencies = [ 3255 | "getrandom", 3256 | ] 3257 | 3258 | [[package]] 3259 | name = "vcpkg" 3260 | version = "0.2.15" 3261 | source = "registry+https://github.com/rust-lang/crates.io-index" 3262 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3263 | 3264 | [[package]] 3265 | name = "version_check" 3266 | version = "0.9.3" 3267 | source = "registry+https://github.com/rust-lang/crates.io-index" 3268 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 3269 | 3270 | [[package]] 3271 | name = "want" 3272 | version = "0.3.0" 3273 | source = "registry+https://github.com/rust-lang/crates.io-index" 3274 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 3275 | dependencies = [ 3276 | "log", 3277 | "try-lock", 3278 | ] 3279 | 3280 | [[package]] 3281 | name = "wasi" 3282 | version = "0.11.0+wasi-snapshot-preview1" 3283 | source = "registry+https://github.com/rust-lang/crates.io-index" 3284 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3285 | 3286 | [[package]] 3287 | name = "wasm-bindgen" 3288 | version = "0.2.78" 3289 | source = "registry+https://github.com/rust-lang/crates.io-index" 3290 | checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" 3291 | dependencies = [ 3292 | "cfg-if 1.0.0", 3293 | "serde", 3294 | "serde_json", 3295 | "wasm-bindgen-macro", 3296 | ] 3297 | 3298 | [[package]] 3299 | name = "wasm-bindgen-backend" 3300 | version = "0.2.78" 3301 | source = "registry+https://github.com/rust-lang/crates.io-index" 3302 | checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" 3303 | dependencies = [ 3304 | "bumpalo", 3305 | "lazy_static", 3306 | "log", 3307 | "proc-macro2", 3308 | "quote", 3309 | "syn", 3310 | "wasm-bindgen-shared", 3311 | ] 3312 | 3313 | [[package]] 3314 | name = "wasm-bindgen-futures" 3315 | version = "0.4.28" 3316 | source = "registry+https://github.com/rust-lang/crates.io-index" 3317 | checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" 3318 | dependencies = [ 3319 | "cfg-if 1.0.0", 3320 | "js-sys", 3321 | "wasm-bindgen", 3322 | "web-sys", 3323 | ] 3324 | 3325 | [[package]] 3326 | name = "wasm-bindgen-macro" 3327 | version = "0.2.78" 3328 | source = "registry+https://github.com/rust-lang/crates.io-index" 3329 | checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" 3330 | dependencies = [ 3331 | "quote", 3332 | "wasm-bindgen-macro-support", 3333 | ] 3334 | 3335 | [[package]] 3336 | name = "wasm-bindgen-macro-support" 3337 | version = "0.2.78" 3338 | source = "registry+https://github.com/rust-lang/crates.io-index" 3339 | checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" 3340 | dependencies = [ 3341 | "proc-macro2", 3342 | "quote", 3343 | "syn", 3344 | "wasm-bindgen-backend", 3345 | "wasm-bindgen-shared", 3346 | ] 3347 | 3348 | [[package]] 3349 | name = "wasm-bindgen-shared" 3350 | version = "0.2.78" 3351 | source = "registry+https://github.com/rust-lang/crates.io-index" 3352 | checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" 3353 | 3354 | [[package]] 3355 | name = "web-sys" 3356 | version = "0.3.55" 3357 | source = "registry+https://github.com/rust-lang/crates.io-index" 3358 | checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" 3359 | dependencies = [ 3360 | "js-sys", 3361 | "wasm-bindgen", 3362 | ] 3363 | 3364 | [[package]] 3365 | name = "webp" 3366 | version = "0.2.2" 3367 | source = "registry+https://github.com/rust-lang/crates.io-index" 3368 | checksum = "cf022f821f166079a407d000ab57e84de020e66ffbbf4edde999bc7d6e371cae" 3369 | dependencies = [ 3370 | "image", 3371 | "libwebp-sys", 3372 | ] 3373 | 3374 | [[package]] 3375 | name = "webpki" 3376 | version = "0.21.4" 3377 | source = "registry+https://github.com/rust-lang/crates.io-index" 3378 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 3379 | dependencies = [ 3380 | "ring", 3381 | "untrusted", 3382 | ] 3383 | 3384 | [[package]] 3385 | name = "webpki-roots" 3386 | version = "0.21.1" 3387 | source = "registry+https://github.com/rust-lang/crates.io-index" 3388 | checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" 3389 | dependencies = [ 3390 | "webpki", 3391 | ] 3392 | 3393 | [[package]] 3394 | name = "weezl" 3395 | version = "0.1.5" 3396 | source = "registry+https://github.com/rust-lang/crates.io-index" 3397 | checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" 3398 | 3399 | [[package]] 3400 | name = "widestring" 3401 | version = "0.4.3" 3402 | source = "registry+https://github.com/rust-lang/crates.io-index" 3403 | checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" 3404 | 3405 | [[package]] 3406 | name = "wildmatch" 3407 | version = "1.1.0" 3408 | source = "registry+https://github.com/rust-lang/crates.io-index" 3409 | checksum = "7f44b95f62d34113cf558c93511ac93027e03e9c29a60dd0fd70e6e025c7270a" 3410 | 3411 | [[package]] 3412 | name = "winapi" 3413 | version = "0.3.9" 3414 | source = "registry+https://github.com/rust-lang/crates.io-index" 3415 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3416 | dependencies = [ 3417 | "winapi-i686-pc-windows-gnu", 3418 | "winapi-x86_64-pc-windows-gnu", 3419 | ] 3420 | 3421 | [[package]] 3422 | name = "winapi-i686-pc-windows-gnu" 3423 | version = "0.4.0" 3424 | source = "registry+https://github.com/rust-lang/crates.io-index" 3425 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3426 | 3427 | [[package]] 3428 | name = "winapi-util" 3429 | version = "0.1.5" 3430 | source = "registry+https://github.com/rust-lang/crates.io-index" 3431 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 3432 | dependencies = [ 3433 | "winapi", 3434 | ] 3435 | 3436 | [[package]] 3437 | name = "winapi-x86_64-pc-windows-gnu" 3438 | version = "0.4.0" 3439 | source = "registry+https://github.com/rust-lang/crates.io-index" 3440 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3441 | 3442 | [[package]] 3443 | name = "winreg" 3444 | version = "0.6.2" 3445 | source = "registry+https://github.com/rust-lang/crates.io-index" 3446 | checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" 3447 | dependencies = [ 3448 | "winapi", 3449 | ] 3450 | 3451 | [[package]] 3452 | name = "winreg" 3453 | version = "0.7.0" 3454 | source = "registry+https://github.com/rust-lang/crates.io-index" 3455 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 3456 | dependencies = [ 3457 | "winapi", 3458 | ] 3459 | 3460 | [[package]] 3461 | name = "xml-rs" 3462 | version = "0.8.4" 3463 | source = "registry+https://github.com/rust-lang/crates.io-index" 3464 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 3465 | 3466 | [[package]] 3467 | name = "zstd" 3468 | version = "0.7.0+zstd.1.4.9" 3469 | source = "registry+https://github.com/rust-lang/crates.io-index" 3470 | checksum = "9428752481d8372e15b1bf779ea518a179ad6c771cca2d2c60e4fbff3cc2cd52" 3471 | dependencies = [ 3472 | "zstd-safe", 3473 | ] 3474 | 3475 | [[package]] 3476 | name = "zstd-safe" 3477 | version = "3.1.0+zstd.1.4.9" 3478 | source = "registry+https://github.com/rust-lang/crates.io-index" 3479 | checksum = "5aa1926623ad7fe406e090555387daf73db555b948134b4d73eac5eb08fb666d" 3480 | dependencies = [ 3481 | "libc", 3482 | "zstd-sys", 3483 | ] 3484 | 3485 | [[package]] 3486 | name = "zstd-sys" 3487 | version = "1.5.0+zstd.1.4.9" 3488 | source = "registry+https://github.com/rust-lang/crates.io-index" 3489 | checksum = "4e6c094340240369025fc6b731b054ee2a834328fa584310ac96aa4baebdc465" 3490 | dependencies = [ 3491 | "cc", 3492 | "libc", 3493 | ] 3494 | 3495 | [[package]] 3496 | name = "zune-inflate" 3497 | version = "0.2.53" 3498 | source = "registry+https://github.com/rust-lang/crates.io-index" 3499 | checksum = "440a08fd59c6442e4b846ea9b10386c38307eae728b216e1ab2c305d1c9daaf8" 3500 | dependencies = [ 3501 | "simd-adler32", 3502 | ] 3503 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "autumn" 3 | version = "1.1.11" 4 | authors = ["Paul Makles "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | log = "0.4.11" 11 | ulid = "0.6.0" 12 | toml = "0.5.8" 13 | webp = "0.2.2" 14 | mime = "0.3.16" 15 | nanoid = "0.3.0" 16 | image = "0.24.6" 17 | dotenv = "0.15.0" 18 | ffprobe = "0.3.0" 19 | futures = "0.3.8" 20 | tempfile = "3.2.0" 21 | once_cell = "1.5.2" 22 | imagesize = "0.9.0" 23 | env_logger = "0.7.1" 24 | tree_magic = "0.2.3" 25 | serde_json = "1.0.60" 26 | lazy_static = "1.4.0" 27 | kamadak-exif = "0.5.4" 28 | sanitize-filename = "0.4.0" 29 | content_inspector = "0.2.4" 30 | serde = { version = "1.0.118", features = ["derive"] } 31 | tokio = { version = "1.4.0", features = ["rt", "io-util", "fs", "time"] } 32 | 33 | tokio-cron-scheduler = "*" 34 | rust-s3 = "0.27.0-rc4" 35 | mongodb = "2.0.0" 36 | 37 | actix-web = "4.0.0-beta.9" 38 | actix-cors = "0.6.0-beta.2" 39 | actix-files = "0.6.0-beta.7" 40 | actix-multipart = "0.4.0-beta.6" 41 | 42 | # virus scanning 43 | revolt_clamav-client = { version = "0.1.5" } 44 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Build Stage 2 | FROM rust:1.80-slim-bullseye AS builder 3 | USER 0:0 4 | WORKDIR /home/rust/src 5 | 6 | RUN USER=root cargo new --bin autumn 7 | WORKDIR /home/rust/src/autumn 8 | COPY Cargo.toml Cargo.lock ./ 9 | COPY src ./src 10 | RUN apt-get update && apt-get install -y libssl-dev pkg-config && cargo install --locked --path . 11 | 12 | # Bundle Stage 13 | FROM debian:bullseye-slim 14 | RUN apt-get update && apt-get install -y ca-certificates ffmpeg 15 | COPY --from=builder /usr/local/cargo/bin/autumn ./ 16 | EXPOSE 3000 17 | ENV AUTUMN_HOST 0.0.0.0:3000 18 | COPY Autumn.toml ./ 19 | CMD ["./autumn"] 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | Autumn 633 | Copyright (C) 2021 REVOLT 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Autumn 2 | 3 | ## Description 4 | 5 | Autumn is the microservice responsible for storing files and attachments. 6 | 7 | **Features:** 8 | 9 | - Save files locally or on S3. 10 | - Support for different tags / buckets with different file requirements. 11 | - Strips metadata from JPEGs and video files. 12 | 13 | ## Stack 14 | 15 | - [Actix-Web](https://actix.rs/) 16 | - [rust-s3](https://github.com/durch/rust-s3) 17 | - [MongoDB](https://mongodb.com/) 18 | 19 | ## Resources 20 | 21 | ### Revolt 22 | 23 | - [Revolt Project Board](https://github.com/revoltchat/revolt/discussions) (Submit feature requests here) 24 | - [Revolt Testers Server](https://app.revolt.chat/invite/Testers) 25 | - [Contribution Guide](https://developers.revolt.chat/contributing) 26 | 27 | ## CLI Commands 28 | 29 | | Command | Description | 30 | | ------------------ | ------------------------------------------------------------------------------------------ | 31 | | `cargo build` | Build/compile Autumn. | 32 | | `cargo run` | Run Autumn. | 33 | | `cargo fmt` | Format Autumn. Not intended for PR use to avoid accidentally formatting unformatted files. | 34 | 35 | ## Contributing 36 | 37 | The contribution guide is located at [developers.revolt.chat/contributing](https://developers.revolt.chat/contributing). 38 | Please note that a pull request should only take care of one issue so that we can review it quickly. 39 | 40 | ## License 41 | 42 | Autumn is licensed under the [GNU Affero General Public License v3.0](https://github.com/revoltchat/autumn/blob/master/LICENSE). 43 | 44 | ## To-Do 45 | 46 | - Make EXIF stripping optional, but on by default. (?exif=false) 47 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use actix_web::HttpRequest; 2 | use once_cell::sync::OnceCell; 3 | use serde::{Deserialize, Serialize}; 4 | use std::collections::HashMap; 5 | use std::fs::File; 6 | use std::io::Read; 7 | 8 | use crate::util::result::Error; 9 | use crate::util::variables::CONFIG; 10 | 11 | #[derive(Serialize, Deserialize, Debug)] 12 | pub enum ContentType { 13 | Image, 14 | Video, 15 | Audio, 16 | } 17 | 18 | fn default_as_true() -> bool { 19 | true 20 | } 21 | 22 | #[derive(Serialize, Deserialize, Debug)] 23 | pub struct Tag { 24 | pub max_size: usize, 25 | #[serde(default)] 26 | pub use_ulid: bool, 27 | #[serde(default = "default_as_true")] 28 | pub enabled: bool, 29 | #[serde(skip_serializing_if = "Vec::is_empty", default)] 30 | pub serve_if_field_present: Vec, 31 | #[serde(skip_serializing_if = "Option::is_none")] 32 | pub restrict_content_type: Option, 33 | } 34 | 35 | #[derive(Serialize, Deserialize, Debug)] 36 | #[serde(tag = "as")] 37 | pub enum ServeConfig { 38 | WEBP { quality: Option }, 39 | PNG, 40 | } 41 | 42 | #[derive(Serialize, Deserialize, Debug, Default)] 43 | pub struct FilterConfig { 44 | #[serde(skip_serializing_if = "Vec::is_empty", default)] 45 | pub content_types: Vec, 46 | } 47 | 48 | #[derive(Serialize, Deserialize, Debug)] 49 | pub struct Config { 50 | pub tags: HashMap, 51 | pub serve: ServeConfig, 52 | pub jpeg_quality: u8, 53 | #[serde(default)] 54 | pub filter: FilterConfig, 55 | } 56 | 57 | static INSTANCE: OnceCell = OnceCell::new(); 58 | 59 | impl Config { 60 | pub fn global() -> &'static Config { 61 | INSTANCE.get().expect("Config is not initialized.") 62 | } 63 | 64 | pub fn init() -> std::io::Result<()> { 65 | let mut file = File::open(&*CONFIG)?; 66 | let mut contents = String::new(); 67 | file.read_to_string(&mut contents)?; 68 | 69 | let config: Config = toml::from_str(&contents).unwrap(); 70 | INSTANCE.set(config).expect("Failed to set global config."); 71 | Ok(()) 72 | } 73 | } 74 | 75 | pub fn get_tag(request: &HttpRequest) -> Result<(String, &Tag), Error> { 76 | let id = request.match_info().query("tag"); 77 | let config = Config::global(); 78 | 79 | if let Some(tag) = config.tags.get(id) { 80 | if !tag.enabled { 81 | return Err(Error::UnknownTag); 82 | } 83 | 84 | Ok((id.to_string(), tag)) 85 | } else { 86 | Err(Error::UnknownTag) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/db.rs: -------------------------------------------------------------------------------- 1 | use crate::config::Tag; 2 | use crate::util::result::Error; 3 | use crate::util::variables::{ 4 | get_s3_bucket, LOCAL_STORAGE_PATH, MONGO_DATABASE, MONGO_URI, USE_S3, 5 | }; 6 | 7 | use actix_web::web; 8 | use mongodb::bson::doc; 9 | use mongodb::{Client, Collection}; 10 | use once_cell::sync::OnceCell; 11 | use serde::{Deserialize, Serialize}; 12 | 13 | static DBCONN: OnceCell = OnceCell::new(); 14 | 15 | pub async fn connect() { 16 | let client = Client::with_uri_str(&*MONGO_URI) 17 | .await 18 | .expect("Failed to init db connection."); 19 | 20 | DBCONN.set(client).unwrap(); 21 | } 22 | 23 | pub fn get_collection(collection: &str) -> Collection { 24 | DBCONN 25 | .get() 26 | .unwrap() 27 | .database(&MONGO_DATABASE) 28 | .collection(collection) 29 | } 30 | 31 | #[derive(Serialize, Deserialize, Debug)] 32 | #[serde(tag = "type")] 33 | pub enum Metadata { 34 | File, 35 | Text, 36 | Image { width: isize, height: isize }, 37 | Video { width: isize, height: isize }, 38 | Audio, 39 | } 40 | 41 | #[derive(Serialize, Deserialize, Debug)] 42 | pub struct File { 43 | #[serde(rename = "_id")] 44 | pub id: String, 45 | pub tag: String, 46 | pub filename: String, 47 | pub metadata: Metadata, 48 | pub content_type: String, 49 | pub size: isize, 50 | 51 | #[serde(skip_serializing_if = "Option::is_none")] 52 | pub deleted: Option, 53 | #[serde(skip_serializing_if = "Option::is_none")] 54 | pub reported: Option, 55 | } 56 | 57 | impl File { 58 | pub async fn delete_in_storage(&self) -> Result<(), Error> { 59 | if *USE_S3 { 60 | let bucket = get_s3_bucket(&self.tag)?; 61 | 62 | let (_, code) = bucket 63 | .delete_object(format!("/{}", &self.id)) 64 | .await 65 | .map_err(|_| Error::S3Error)?; 66 | 67 | if code != 200 { 68 | return Err(Error::S3Error); 69 | } 70 | } else { 71 | let path = format!("{}/{}", *LOCAL_STORAGE_PATH, &self.id); 72 | web::block(|| std::fs::remove_file(path)) 73 | .await 74 | .map_err(|_| Error::BlockingError)? 75 | .map_err(|_| Error::IOError)?; 76 | } 77 | 78 | Ok(()) 79 | } 80 | 81 | pub async fn delete(self) -> Result<(), Error> { 82 | self.delete_in_storage().await.ok(); 83 | 84 | get_collection("attachments") 85 | .delete_one(doc! { "_id": &self.id }, None) 86 | .await 87 | .map_err(|_| Error::DatabaseError)?; 88 | 89 | println!("Deleted attachment {}", self.id); 90 | Ok(()) 91 | } 92 | } 93 | 94 | pub async fn find_file(id: &str, tag: (String, &Tag)) -> Result { 95 | let mut query = doc! { "_id": id, "tag": tag.0 }; 96 | 97 | if !&tag.1.serve_if_field_present.is_empty() { 98 | let mut or = vec![]; 99 | for field in &tag.1.serve_if_field_present { 100 | or.push(doc! { 101 | field: { 102 | "$exists": true 103 | } 104 | }); 105 | } 106 | 107 | query.insert("$or", or); 108 | } 109 | 110 | get_collection("attachments") 111 | .find_one(query, None) 112 | .await 113 | .map_err(|_| Error::DatabaseError)? 114 | .ok_or(Error::NotFound) 115 | } 116 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | pub mod db; 3 | pub mod routes; 4 | pub mod util; 5 | pub mod version; 6 | pub mod virus_scan; 7 | 8 | use futures::StreamExt; 9 | use util::variables::{CONFIG, HOST, LOCAL_STORAGE_PATH, USE_S3}; 10 | 11 | #[macro_use] 12 | extern crate lazy_static; 13 | extern crate tree_magic; 14 | 15 | use actix_cors::Cors; 16 | use actix_web::{middleware, web, App, HttpServer}; 17 | use log::info; 18 | use mongodb::bson::doc; 19 | use std::env; 20 | 21 | pub static CACHE_CONTROL: &str = "public, max-age=604800, must-revalidate"; 22 | 23 | #[actix_web::main] 24 | async fn main() -> std::io::Result<()> { 25 | dotenv::dotenv().ok(); 26 | 27 | if let Ok(v) = env::var("MINIO_ROOT_USER") { 28 | env::set_var("AWS_ACCESS_KEY_ID", v); 29 | } 30 | 31 | if let Ok(v) = env::var("MINIO_ROOT_PASSWORD") { 32 | env::set_var("AWS_SECRET_ACCESS_KEY", v); 33 | } 34 | 35 | env_logger::init_from_env(env_logger::Env::default().filter_or("RUST_LOG", "info")); 36 | 37 | config::Config::init() 38 | .unwrap_or_else(|err| panic!("Unable to load the config '{}'. {}", *CONFIG, err)); 39 | 40 | info!("Starting Autumn server."); 41 | 42 | virus_scan::init(); 43 | 44 | db::connect().await; 45 | 46 | if !*USE_S3 { 47 | info!("Ensuring local storage directory exists."); 48 | std::fs::create_dir_all(LOCAL_STORAGE_PATH.to_string()).unwrap(); 49 | } else { 50 | info!("Skipping existence check, make sure your S3 buckets exist!"); 51 | } 52 | 53 | tokio::spawn(async { 54 | let mut sched = tokio_cron_scheduler::JobScheduler::new(); 55 | 56 | sched 57 | .add( 58 | tokio_cron_scheduler::Job::new_repeated( 59 | core::time::Duration::from_secs(600), 60 | |_, _| { 61 | tokio::spawn(async { 62 | let col = db::get_collection("attachments"); 63 | let mut cursor = col 64 | .find( 65 | doc! { 66 | "deleted": true, 67 | "reported": { 68 | "$ne": true 69 | } 70 | }, 71 | None, 72 | ) 73 | .await 74 | .unwrap(); 75 | 76 | while let Some(result) = cursor.next().await { 77 | if let Ok(file) = result { 78 | file.delete().await.unwrap(); 79 | } 80 | 81 | // Delay before doing the next item in list. 82 | tokio::time::sleep(core::time::Duration::from_millis(50)).await; 83 | } 84 | }); 85 | }, 86 | ) 87 | .unwrap(), 88 | ) 89 | .unwrap(); 90 | 91 | sched.start().await.unwrap(); 92 | }); 93 | 94 | HttpServer::new(|| { 95 | App::new() 96 | .wrap( 97 | Cors::default() 98 | .allowed_origin_fn(|_, _| true) 99 | .allowed_methods(vec!["GET", "POST"]) 100 | .allowed_headers(["X-Session-Token", "X-Bot-Token"]) 101 | .supports_credentials(), 102 | ) 103 | .wrap(middleware::Logger::default()) 104 | .route("/{tag:[^/]*}", web::post().to(routes::upload::post)) 105 | .route( 106 | "/{tag:[^/]*}/download/{filename:.*}", 107 | web::get().to(routes::download::get), 108 | ) 109 | .route( 110 | "/{tag:[^/]*}/{filename:[^/]*}", 111 | web::get().to(routes::serve::get), 112 | ) 113 | .route( 114 | "/{tag:[^/]*}/{filename:[^/]*}/{fn:.*}", 115 | web::get().to(routes::serve::get), 116 | ) 117 | .route("/", web::get().to(routes::index::get)) 118 | }) 119 | .bind(HOST.clone())? 120 | .run() 121 | .await 122 | } 123 | -------------------------------------------------------------------------------- /src/routes/download.rs: -------------------------------------------------------------------------------- 1 | use crate::config::{get_tag, Config}; 2 | use crate::db::find_file; 3 | use crate::util::result::Error; 4 | 5 | use super::serve::fetch_file; 6 | 7 | use actix_web::{HttpRequest, HttpResponse}; 8 | 9 | pub async fn get(req: HttpRequest) -> Result { 10 | let tag = get_tag(&req)?; 11 | 12 | let id = req.match_info().query("filename"); 13 | let file = find_file(id, tag.clone()).await?; 14 | 15 | if let Some(true) = file.deleted { 16 | return Err(Error::NotFound); 17 | } 18 | 19 | let config = Config::global(); 20 | if config.filter.content_types.contains(&file.content_type) { 21 | return Err(Error::ContentTypeNotAllowed); 22 | } 23 | 24 | let (contents, _) = fetch_file(id, &tag.0, file.metadata, None).await?; 25 | 26 | Ok(HttpResponse::Ok() 27 | .insert_header(( 28 | "Content-Disposition", 29 | format!("attachment; filename=\"{}\"", file.filename), 30 | )) 31 | .insert_header(("Cache-Control", crate::CACHE_CONTROL)) 32 | .content_type(file.content_type) 33 | .body(contents)) 34 | } 35 | -------------------------------------------------------------------------------- /src/routes/index.rs: -------------------------------------------------------------------------------- 1 | use crate::config::Config; 2 | 3 | use actix_web::HttpResponse; 4 | use serde_json::json; 5 | 6 | pub async fn get() -> HttpResponse { 7 | let config = Config::global(); 8 | let body = json!({ 9 | "autumn": crate::version::VERSION, 10 | "tags": config.tags, 11 | "jpeg_quality": config.jpeg_quality 12 | }); 13 | 14 | HttpResponse::Ok().json(body) 15 | } 16 | -------------------------------------------------------------------------------- /src/routes/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod download; 2 | pub mod index; 3 | pub mod serve; 4 | pub mod upload; 5 | -------------------------------------------------------------------------------- /src/routes/serve.rs: -------------------------------------------------------------------------------- 1 | use crate::config::{get_tag, Config, ServeConfig}; 2 | use crate::db::*; 3 | use crate::util::result::Error; 4 | use crate::util::variables::{get_s3_bucket, LOCAL_STORAGE_PATH, USE_S3}; 5 | 6 | use actix_web::{web::Query, HttpRequest, HttpResponse}; 7 | use image::{io::Reader as ImageReader, ImageError}; 8 | use mongodb::bson::doc; 9 | use serde::Deserialize; 10 | use std::cmp; 11 | use std::io::Cursor; 12 | use std::path::PathBuf; 13 | use tokio::fs::File; 14 | use tokio::io::AsyncReadExt; 15 | 16 | #[derive(Deserialize, Debug)] 17 | pub struct Resize { 18 | pub size: Option, 19 | pub width: Option, 20 | pub height: Option, 21 | pub max_side: Option, 22 | } 23 | 24 | pub fn try_resize(buf: Vec, width: u32, height: u32) -> Result, ImageError> { 25 | let mut bytes: Vec = Vec::new(); 26 | let config = Config::global(); 27 | 28 | let image = ImageReader::new(Cursor::new(buf)) 29 | .with_guessed_format()? 30 | .decode()? 31 | // resize_exact is about 2.5x slower, 32 | // thumb approximation doesn't have terrible quality so it's fine to stick with 33 | //.resize_exact(width as u32, height as u32, image::imageops::FilterType::Gaussian) 34 | .thumbnail_exact(width as u32, height as u32); 35 | 36 | match config.serve { 37 | ServeConfig::PNG => { 38 | let mut writer = Cursor::new(&mut bytes); 39 | image.write_to(&mut writer, image::ImageOutputFormat::Png)?; 40 | } 41 | ServeConfig::WEBP { quality } => { 42 | let encoder = webp::Encoder::from_image(&image).expect("Could not create encoder."); 43 | if let Some(quality) = quality { 44 | bytes = encoder.encode(quality).to_vec(); 45 | } else { 46 | bytes = encoder.encode_lossless().to_vec(); 47 | } 48 | } 49 | } 50 | 51 | Ok(bytes) 52 | } 53 | 54 | pub async fn fetch_file( 55 | id: &str, 56 | tag: &str, 57 | metadata: Metadata, 58 | resize: Option, 59 | ) -> Result<(Vec, Option), Error> { 60 | let mut contents = vec![]; 61 | let config = Config::global(); 62 | 63 | if *USE_S3 { 64 | let bucket = get_s3_bucket(tag)?; 65 | let (data, code) = bucket 66 | .get_object(format!("/{}", id)) 67 | .await 68 | .map_err(|_| Error::S3Error)?; 69 | 70 | if code != 200 { 71 | return Err(Error::S3Error); 72 | } 73 | 74 | contents = data; 75 | } else { 76 | let path: PathBuf = format!("{}/{}", *LOCAL_STORAGE_PATH, id) 77 | .parse() 78 | .map_err(|_| Error::IOError)?; 79 | 80 | let mut f = File::open(path.clone()).await.map_err(|_| Error::IOError)?; 81 | f.read_to_end(&mut contents) 82 | .await 83 | .map_err(|_| Error::IOError)?; 84 | } 85 | 86 | if let Some(parameters) = resize { 87 | if let Metadata::Image { width, height } = metadata { 88 | let shortest_length = cmp::min(width, height); 89 | let (target_width, target_height) = match ( 90 | parameters.size, 91 | parameters.max_side, 92 | parameters.width, 93 | parameters.height, 94 | ) { 95 | (Some(size), _, _, _) => { 96 | let smallest_size = cmp::min(size, shortest_length); 97 | (smallest_size, smallest_size) 98 | } 99 | (_, Some(size), _, _) => { 100 | if shortest_length == width { 101 | let h = cmp::min(height, size); 102 | ((width as f32 * (h as f32 / height as f32)) as isize, h) 103 | } else { 104 | let w = cmp::min(width, size); 105 | (w, (height as f32 * (w as f32 / width as f32)) as isize) 106 | } 107 | } 108 | (_, _, Some(w), Some(h)) => (cmp::min(width, w), cmp::min(height, h)), 109 | (_, _, Some(w), _) => { 110 | let w = cmp::min(width, w); 111 | (w, (w as f32 * (height as f32 / width as f32)) as isize) 112 | } 113 | (_, _, _, Some(h)) => { 114 | let h = cmp::min(height, h); 115 | ((h as f32 * (width as f32 / height as f32)) as isize, h) 116 | } 117 | _ => return Ok((contents, None)), 118 | }; 119 | 120 | // There should be a way to do this zero-copy, but I can't be asked to figure it out right now. 121 | let cloned = contents.clone(); 122 | if let Ok(Ok(bytes)) = actix_web::web::block(move || { 123 | try_resize(cloned, target_width as u32, target_height as u32) 124 | }) 125 | .await 126 | { 127 | return Ok(( 128 | bytes, 129 | Some( 130 | match config.serve { 131 | ServeConfig::PNG => "image/png", 132 | ServeConfig::WEBP { .. } => "image/webp", 133 | } 134 | .to_string(), 135 | ), 136 | )); 137 | } 138 | } 139 | } 140 | 141 | Ok((contents, None)) 142 | } 143 | 144 | pub async fn get(req: HttpRequest, resize: Query) -> Result { 145 | let tag = get_tag(&req)?; 146 | 147 | let id = req.match_info().query("filename"); 148 | let file = find_file(id, tag.clone()).await?; 149 | 150 | if let Some(true) = file.deleted { 151 | return Err(Error::NotFound); 152 | } 153 | 154 | let config = Config::global(); 155 | if config.filter.content_types.contains(&file.content_type) { 156 | return Err(Error::ContentTypeNotAllowed); 157 | } 158 | 159 | let (contents, content_type) = fetch_file(id, &tag.0, file.metadata, Some(resize.0)).await?; 160 | let content_type = content_type.unwrap_or(file.content_type); 161 | 162 | // This list should match files accepted 163 | // by upload.rs#L68 as allowed images / videos. 164 | let diposition = match content_type.as_ref() { 165 | "image/jpeg" | "image/png" | "image/gif" | "image/webp" | "video/mp4" | "video/webm" 166 | | "video/webp" | "audio/quicktime" | "audio/mpeg" => "inline", 167 | _ => "attachment", 168 | }; 169 | 170 | Ok(HttpResponse::Ok() 171 | .insert_header(("Content-Disposition", diposition)) 172 | .insert_header(("Cache-Control", crate::CACHE_CONTROL)) 173 | .content_type(content_type) 174 | .body(contents)) 175 | } 176 | -------------------------------------------------------------------------------- /src/routes/upload.rs: -------------------------------------------------------------------------------- 1 | use crate::config::{get_tag, Config, ContentType}; 2 | use crate::db::*; 3 | use crate::util::result::Error; 4 | use crate::util::variables::{get_s3_bucket, CLAMD_HOST, LOCAL_STORAGE_PATH, USE_CLAMD, USE_S3}; 5 | 6 | use actix_multipart::Multipart; 7 | use actix_web::{web, HttpRequest, HttpResponse}; 8 | use content_inspector::inspect; 9 | use ffprobe::ffprobe; 10 | use futures::{StreamExt, TryStreamExt}; 11 | use image::io::Reader as ImageReader; 12 | use imagesize; 13 | use nanoid::nanoid; 14 | use serde_json::json; 15 | use std::convert::TryInto; 16 | use std::io::{Cursor, Read, Write}; 17 | use std::process::Command; 18 | use tempfile::NamedTempFile; 19 | 20 | pub fn determine_video_size(path: &std::path::Path) -> Result<(isize, isize), Error> { 21 | let data = ffprobe(path).map_err(|_| Error::ProbeError)?; 22 | 23 | // Take the first valid stream. 24 | for stream in data.streams { 25 | if let (Some(w), Some(h)) = (stream.width, stream.height) { 26 | if let (Ok(w), Ok(h)) = (w.try_into(), h.try_into()) { 27 | return Ok((w, h)); 28 | } 29 | } 30 | } 31 | 32 | Err(Error::ProbeError) 33 | } 34 | 35 | pub async fn post(req: HttpRequest, mut payload: Multipart) -> Result { 36 | let config = Config::global(); 37 | let (tag_id, tag) = get_tag(&req)?; 38 | 39 | if let Ok(Some(mut field)) = payload.try_next().await { 40 | let content_type = field.content_disposition().ok_or(Error::FailedToReceive)?; 41 | let filename = content_type 42 | .get_filename() 43 | .ok_or(Error::FailedToReceive)? 44 | .to_string(); 45 | 46 | // ? Read multipart data into a buffer. 47 | let mut file_size: usize = 0; 48 | let mut buf: Vec = Vec::new(); 49 | while let Some(chunk) = field.next().await { 50 | let data = chunk.map_err(|_| Error::FailedToReceive)?; 51 | file_size += data.len(); 52 | 53 | if file_size > tag.max_size { 54 | return Err(Error::FileTooLarge { 55 | max_size: tag.max_size, 56 | }); 57 | } 58 | 59 | buf.append(&mut data.to_vec()); 60 | } 61 | 62 | // ? Find the content-type of the data. 63 | let mut content_type = tree_magic::from_u8(&buf); 64 | 65 | // Intercept known file extensions with certain content types 66 | if content_type == "application/zip" && filename.to_lowercase().ends_with(".apk") { 67 | content_type = "application/vnd.android.package-archive".to_string(); 68 | } 69 | 70 | if content_type == "application/x-riff" { 71 | if filename.to_lowercase().ends_with(".webp") { 72 | content_type = "image/webp".to_string(); 73 | } else if filename.to_lowercase().ends_with(".wav") 74 | || filename.to_lowercase().ends_with(".wave") 75 | { 76 | content_type = "audio/wav".to_string(); 77 | } 78 | } 79 | 80 | // Check if content type is blocked 81 | if config.filter.content_types.contains(&content_type) { 82 | return Err(Error::ContentTypeNotAllowed); 83 | } 84 | 85 | let s = &content_type[..]; 86 | 87 | let metadata = match s { 88 | /* jpg */ "image/jpeg" | 89 | /* png */ "image/png" | 90 | /* gif */ "image/gif" | 91 | /* webp */ "image/webp" => { 92 | if let Ok(imagesize::ImageSize { width, height }) = imagesize::blob_size(&buf) { 93 | if s == "image/jpeg" || s == "image/png" { 94 | let mut cursor = Cursor::new(buf); 95 | 96 | // Attempt to extract orientation data. 97 | let exif_reader = exif::Reader::new(); 98 | let rotation = match exif_reader.read_from_container(&mut cursor) { 99 | Ok(exif) => { 100 | match exif.get_field(exif::Tag::Orientation, exif::In::PRIMARY) { 101 | Some(orientation) => { 102 | match orientation.value.get_uint(0) { 103 | Some(v @ 1..=8) => v, 104 | _ => 0 105 | } 106 | } 107 | _ => 0 108 | } 109 | } 110 | _ => 0 111 | }; 112 | 113 | cursor.set_position(0); 114 | 115 | // Re-encode JPEGs to remove EXIF data. 116 | // Also re-encode PNGs to mitigate CVE-2023-21036 117 | let output_format: image::ImageOutputFormat = if s == "image/jpeg" { 118 | image::ImageOutputFormat::Jpeg(config.jpeg_quality) 119 | } else { // It's a PNG 120 | image::ImageOutputFormat::Png 121 | }; 122 | 123 | let image = ImageReader::new(cursor) 124 | .with_guessed_format() 125 | .map_err(|_| Error::IOError)? 126 | .decode() 127 | .map_err(|_| Error::IOError); 128 | 129 | let mut bytes: Vec = Vec::new(); 130 | let mut writer = Cursor::new(&mut bytes); 131 | 132 | // See https://jdhao.github.io/2019/07/31/image_rotation_exif_info/ 133 | match &rotation { 134 | 2 => { image?.fliph() } 135 | 3 => { image?.rotate180() } 136 | 4 => { image?.rotate180().fliph() } 137 | 5 => { image?.rotate90().fliph() } 138 | 6 => { image?.rotate90() } 139 | 7 => { image?.rotate270().fliph() } 140 | 8 => { image?.rotate270() } 141 | _ => { image? } 142 | } 143 | .write_to(&mut writer, output_format) 144 | .map_err(|_| Error::IOError)?; 145 | 146 | buf = bytes; 147 | 148 | // Calculate dimensions after rotation. 149 | let (width, height) = match &rotation { 150 | 2 | 4 | 5 | 7 => (height, width), 151 | _ => (width, height) 152 | }; 153 | 154 | Metadata::Image { 155 | width: width.try_into().map_err(|_| Error::IOError)?, 156 | height: height.try_into().map_err(|_| Error::IOError)? 157 | } 158 | } else { 159 | // GIFs and WebPs will not be re-encoded. 160 | Metadata::Image { 161 | width: width.try_into().map_err(|_| Error::IOError)?, 162 | height: height.try_into().map_err(|_| Error::IOError)? 163 | } 164 | } 165 | } else { 166 | Metadata::File 167 | } 168 | } 169 | /* mp4 */ "video/mp4" | 170 | /* webm */ "video/webm" | 171 | /* mov */ "video/quicktime" => { 172 | let ext = match s { 173 | "video/mp4" => "mp4", 174 | "video/webm" => "webm", 175 | "video/quicktime" => "mov", 176 | _ => unreachable!() 177 | }; 178 | 179 | let mut tmp = NamedTempFile::new().map_err(|_| Error::IOError)?; 180 | tmp.write_all(&buf).map_err(|_| Error::IOError)?; 181 | 182 | if let Ok(Ok(((width, height), tmp))) = web::block(move || determine_video_size(tmp.path()).map(|t| (t, tmp))).await { 183 | buf = vec![]; 184 | let out_tmp = NamedTempFile::new().map_err(|_| Error::IOError)?; 185 | let out_tmp = web::block(move || 186 | Command::new("ffmpeg") 187 | .args(&[ 188 | "-y", // Overwrite the temporary file. 189 | "-i", tmp.path().to_str().ok_or(Error::IOError)?, // Read the original uploaded file. 190 | "-map_metadata", "-1", // Strip any metadata. 191 | "-c:v", "copy", "-c:a", "copy", // Copy video / audio data to new file. 192 | "-f", ext, // Select the correct file format. 193 | out_tmp.path().to_str().ok_or(Error::IOError)?]) // Save to new temporary file. 194 | .output() 195 | .map(|_| out_tmp) 196 | .map_err(|_| Error::IOError) 197 | ) 198 | .await 199 | .map_err(|_| Error::BlockingError)? 200 | .map_err(|_| Error::IOError)?; 201 | 202 | let mut file = web::block(move || std::fs::File::open(out_tmp.path()).map(|f| (f, out_tmp))) 203 | .await 204 | .map_err(|_| Error::BlockingError)? 205 | .map_err(|_| Error::IOError)?; 206 | 207 | buf = web::block(move || file.0.read_to_end(&mut buf).map(|_| buf)) 208 | .await 209 | .map_err(|_| Error::BlockingError)? 210 | .map_err(|_| Error::IOError)?; 211 | 212 | Metadata::Video { 213 | width, 214 | height 215 | } 216 | } else { 217 | Metadata::File 218 | } 219 | } 220 | /* mp3 */ "audio/mpeg" | 221 | /* wav */ "audio/wav" | 222 | /* ogg */ "audio/x-vorbis+ogg" | 223 | /* opus */ "audio/x-opus+ogg" => { 224 | Metadata::Audio 225 | } 226 | _ => { 227 | if inspect(&buf).is_text() { 228 | Metadata::Text 229 | } else { 230 | // Scan the file for malware 231 | if *USE_CLAMD { 232 | let scan_response = 233 | revolt_clamav_client::scan_buffer_tcp(&buf, CLAMD_HOST.to_string(), None).unwrap(); 234 | 235 | let file_clean = revolt_clamav_client::clean(&scan_response).unwrap(); 236 | if !file_clean { 237 | return Err(Error::Malware) 238 | } 239 | } 240 | 241 | Metadata::File 242 | } 243 | } 244 | }; 245 | 246 | if let Some(content_type) = &tag.restrict_content_type { 247 | if !matches!( 248 | (content_type, &metadata), 249 | (ContentType::Image, Metadata::Image { .. }) 250 | | (ContentType::Video, Metadata::Video { .. }) 251 | | (ContentType::Audio, Metadata::Audio) 252 | ) { 253 | return Err(Error::FileTypeNotAllowed); 254 | } 255 | } 256 | 257 | let id = if tag.use_ulid { 258 | ulid::Ulid::new().to_string() 259 | } else { 260 | nanoid!(42) 261 | }; 262 | 263 | let file = crate::db::File { 264 | id, 265 | tag: tag_id.clone(), 266 | filename, 267 | metadata, 268 | content_type, 269 | size: buf.len() as isize, 270 | deleted: None, 271 | reported: None, 272 | }; 273 | 274 | get_collection("attachments") 275 | .insert_one(&file, None) 276 | .await 277 | .map_err(|_| Error::DatabaseError)?; 278 | 279 | if *USE_S3 { 280 | let bucket = get_s3_bucket(&tag_id)?; 281 | 282 | let (_, code) = bucket 283 | .put_object(format!("/{}", file.id), &buf) 284 | .await 285 | .map_err(|_| Error::S3Error)?; 286 | 287 | if code != 200 { 288 | return Err(Error::S3Error); 289 | } 290 | } else { 291 | let path = format!("{}/{}", *LOCAL_STORAGE_PATH, &file.id); 292 | let mut f = web::block(|| std::fs::File::create(path)) 293 | .await 294 | .map_err(|_| Error::BlockingError)? 295 | .map_err(|_| Error::IOError)?; 296 | 297 | web::block(move || f.write_all(&buf)) 298 | .await 299 | .map_err(|_| Error::BlockingError)? 300 | .map_err(|_| Error::IOError)?; 301 | } 302 | 303 | Ok(HttpResponse::Ok().json(json!({ "id": file.id }))) 304 | } else { 305 | Err(Error::MissingData) 306 | } 307 | } 308 | -------------------------------------------------------------------------------- /src/util/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod result; 2 | pub mod variables; 3 | -------------------------------------------------------------------------------- /src/util/result.rs: -------------------------------------------------------------------------------- 1 | use actix_web::http::StatusCode; 2 | use actix_web::{HttpResponse, ResponseError}; 3 | use serde::Serialize; 4 | use serde_json; 5 | use std::fmt::Display; 6 | 7 | #[derive(Serialize, Debug)] 8 | #[serde(tag = "type")] 9 | pub enum Error { 10 | FileTooLarge { max_size: usize }, 11 | ContentTypeNotAllowed, 12 | FileTypeNotAllowed, 13 | FailedToReceive, 14 | BlockingError, 15 | DatabaseError, 16 | MissingData, 17 | UnknownTag, 18 | ProbeError, 19 | NotFound, 20 | Malware, 21 | IOError, 22 | S3Error, 23 | LabelMe, 24 | } 25 | 26 | impl Display for Error { 27 | fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 28 | todo!() 29 | } 30 | } 31 | 32 | impl ResponseError for Error { 33 | fn status_code(&self) -> StatusCode { 34 | match &self { 35 | Error::FileTooLarge { .. } => StatusCode::PAYLOAD_TOO_LARGE, 36 | Error::ContentTypeNotAllowed => StatusCode::BAD_REQUEST, 37 | Error::FileTypeNotAllowed => StatusCode::BAD_REQUEST, 38 | Error::FailedToReceive => StatusCode::BAD_REQUEST, 39 | Error::DatabaseError => StatusCode::INTERNAL_SERVER_ERROR, 40 | Error::MissingData => StatusCode::BAD_REQUEST, 41 | Error::UnknownTag => StatusCode::BAD_REQUEST, 42 | Error::ProbeError => StatusCode::INTERNAL_SERVER_ERROR, 43 | Error::NotFound => StatusCode::NOT_FOUND, 44 | Error::BlockingError => StatusCode::INTERNAL_SERVER_ERROR, 45 | Error::IOError => StatusCode::INTERNAL_SERVER_ERROR, 46 | Error::S3Error => StatusCode::INTERNAL_SERVER_ERROR, 47 | Error::LabelMe => StatusCode::INTERNAL_SERVER_ERROR, 48 | Error::Malware => StatusCode::FORBIDDEN, 49 | } 50 | } 51 | 52 | fn error_response(&self) -> HttpResponse { 53 | let body = serde_json::to_string(&self).unwrap(); 54 | 55 | HttpResponse::build(self.status_code()) 56 | .content_type("application/json") 57 | .body(body) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/util/variables.rs: -------------------------------------------------------------------------------- 1 | use crate::util::result::Error; 2 | 3 | use s3::{creds::Credentials, Region}; 4 | use std::env; 5 | 6 | lazy_static! { 7 | // Application Settings 8 | pub static ref CONFIG: String = 9 | env::var("AUTUMN_CONFIG").unwrap_or_else(|_| String::from("Autumn.toml")); 10 | pub static ref HOST: String = 11 | env::var("AUTUMN_HOST").expect("Missing AUTUMN_HOST environment variable."); 12 | pub static ref MONGO_URI: String = 13 | env::var("AUTUMN_MONGO_URI").expect("Missing AUTUMN_MONGO_URI environment variable."); 14 | pub static ref MONGO_DATABASE: String = 15 | env::var("AUTUMN_MONGO_DATABASE").unwrap_or_else(|_| "revolt".to_string()); 16 | pub static ref CORS_ALLOWED_ORIGIN: String = 17 | env::var("AUTUMN_CORS_ALLOWED_ORIGIN").expect("Missing AUTUMN_CORS_ALLOWED_ORIGIN environment variable."); 18 | pub static ref CLAMD_HOST: String = 19 | env::var("CLAMD_HOST").expect("Missing CLAMD_HOST environment variable."); 20 | 21 | // Storage Settings 22 | pub static ref LOCAL_STORAGE_PATH: String = 23 | env::var("AUTUMN_LOCAL_STORAGE_PATH").unwrap_or_else(|_| "./files".to_string()); 24 | pub static ref S3_REGION: Region = Region::Custom { 25 | region: env::var("AUTUMN_S3_REGION").unwrap_or_else(|_| "".to_string()), 26 | endpoint: env::var("AUTUMN_S3_ENDPOINT").unwrap_or_else(|_| "".to_string()) 27 | }; 28 | pub static ref S3_BUCKET_PREFIX: String = env::var("AUTUMN_S3_BUCKET_PREFIX").unwrap_or_else(|_| "".to_string()); 29 | pub static ref S3_CREDENTIALS: Credentials = Credentials::default().unwrap(); 30 | 31 | // Application Flags 32 | pub static ref USE_S3: bool = env::var("AUTUMN_S3_REGION").is_ok() && env::var("AUTUMN_S3_ENDPOINT").is_ok(); 33 | pub static ref USE_CLAMD: bool = env::var("CLAMD_HOST").is_ok(); 34 | } 35 | 36 | pub fn get_s3_bucket(bucket: &str) -> Result { 37 | let mut final_bucket_path = S3_BUCKET_PREFIX.to_owned(); 38 | final_bucket_path.push_str(bucket); 39 | s3::Bucket::new_with_path_style( 40 | &final_bucket_path, 41 | S3_REGION.clone(), 42 | S3_CREDENTIALS.clone(), 43 | ) 44 | .map_err(|_| Error::S3Error) 45 | } 46 | -------------------------------------------------------------------------------- /src/version.rs: -------------------------------------------------------------------------------- 1 | pub const VERSION: &str = env!("CARGO_PKG_VERSION"); 2 | -------------------------------------------------------------------------------- /src/virus_scan.rs: -------------------------------------------------------------------------------- 1 | use std::time::Duration; 2 | 3 | use log::{error, info}; 4 | 5 | use crate::util::variables::{CLAMD_HOST, USE_CLAMD}; 6 | 7 | pub fn init() { 8 | if *USE_CLAMD { 9 | info!("Waiting for clamd to be ready..."); 10 | 11 | loop { 12 | let clamd_available = match revolt_clamav_client::ping_tcp(CLAMD_HOST.to_string()) { 13 | Ok(ping_response) => ping_response == b"PONG\0", 14 | Err(_) => false, 15 | }; 16 | 17 | if clamd_available { 18 | info!("clamd is ready, virus protection enabled!"); 19 | break; 20 | } else { 21 | error!( 22 | "Could not ping clamd host at {}, retrying in 10 seconds...", 23 | CLAMD_HOST.to_string() 24 | ); 25 | 26 | std::thread::sleep(Duration::from_secs(10)); 27 | } 28 | } 29 | } 30 | } 31 | --------------------------------------------------------------------------------