From baff1cabae39f55fd5111d0724d1389d08d00a63 Mon Sep 17 00:00:00 2001 From: Mathijs van Veluw Date: Thu, 19 Nov 2026 15:01:35 +0100 Subject: [PATCH] Misc updates (#7980) - Updated all crates except webauthn since it has incompatible dependencies - Updated DataTables JS - Updated GitHub Actions - Applied Zizmore fixes - Removed `fallback-icon.png` and return 404 when a favicon is not found, same as upstream does. - Updated `global_domains.json`, which removed a lot of domains. Even thought this large removal, lets keep it in sync with upstream. Users can still add custom domains to this list, or just add those domains to their vault item it self. Signed-off-by: BlackDex --- .github/workflows/release.yml | 12 +- .github/workflows/sdk-live-tests.yml | 5 +- .github/workflows/trivy.yml | 2 +- .github/workflows/typos.yml | 2 +- .github/workflows/zizmor.yml | 2 +- .pre-commit-config.yaml | 2 +- .typos.toml | 5 +- Cargo.lock | 69 ++- Cargo.toml | 6 +- src/api/icons.rs | 30 +- src/static/global_domains.json | 664 --------------------------- src/static/images/fallback-icon.png | Bin 483 -> 0 bytes src/static/scripts/datatables.css | 4 +- src/static/scripts/datatables.js | 82 ++-- 14 files changed, 126 insertions(+), 759 deletions(-) delete mode 100644 src/static/images/fallback-icon.png diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f80509d..81137067 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,7 +106,7 @@ jobs: # Login to Docker Hub - name: Login to Docker Hub - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -121,7 +121,7 @@ jobs: # Login to GitHub Container Registry - name: Login to GitHub Container Registry - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -137,7 +137,7 @@ jobs: # Login to Quay.io - name: Login to Quay.io - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} @@ -272,7 +272,7 @@ jobs: # Login to Docker Hub - name: Login to Docker Hub - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -287,7 +287,7 @@ jobs: # Login to GitHub Container Registry - name: Login to GitHub Container Registry - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -303,7 +303,7 @@ jobs: # Login to Quay.io - name: Login to Quay.io - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} diff --git a/.github/workflows/sdk-live-tests.yml b/.github/workflows/sdk-live-tests.yml index 25680f56..1d75eead 100644 --- a/.github/workflows/sdk-live-tests.yml +++ b/.github/workflows/sdk-live-tests.yml @@ -1,5 +1,8 @@ name: SDK live tests permissions: {} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true # Runs the live-server end-to-end tests of bitwarden/sdk-internal against this branch, see tools/sdk-live-tests/run.sh. # By default it tests the latest @bitwarden/sdk-internal on npm, which the SDK publishes for every commit to its main @@ -128,7 +131,7 @@ jobs: save-if: ${{ github.ref == 'refs/heads/main' }} - name: "Setup Node" - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version-file: sdk-internal/.nvmrc diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 7ffbe632..4a39491a 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -50,6 +50,6 @@ jobs: severity: CRITICAL,HIGH - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 with: sarif_file: 'trivy-results.sarif' diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index f7d1f92c..ace0c85c 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -23,4 +23,4 @@ jobs: # When this version is updated, do not forget to update this in `.pre-commit-config.yaml` too - name: Spell Check Repo - uses: crate-ci/typos@7f9d0819ca1c008ade73f4b41fa9d258d48f605b # v1.51.1 + uses: crate-ci/typos@276087d9a4f06398b3e04825487805e2d7375888 # v1.52.2 diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 7372759b..71bea7ce 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -24,7 +24,7 @@ jobs: persist-credentials: false - name: Run zizmor - uses: zizmorcore/zizmor-action@53290badfa369cb0bf7ad16342cb62c2fa47ac7b # v0.8.0 + uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1 with: # intentionally not scanning the entire repository, # since it contains integration tests. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 78e7e79d..056b589e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: # When this version is updated, do not forget to update this in `.github/workflows/typos.yaml` too - repo: https://github.com/crate-ci/typos - rev: 7f9d0819ca1c008ade73f4b41fa9d258d48f605b # v1.51.1 + rev: 276087d9a4f06398b3e04825487805e2d7375888 # v1.52.2 hooks: - id: typos always_run: true diff --git a/.typos.toml b/.typos.toml index dabcadb4..d528b088 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,7 +1,8 @@ [files] extend-exclude = [ - ".git/", - "playwright/", + ".git/**", + "target/**", + "playwright/**", "*.js", # Ignore all JavaScript files "!admin*.js", # Except our own JavaScript files ] diff --git a/Cargo.lock b/Cargo.lock index cf05d7df..61c008d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ dependencies = [ "futures-core", "futures-io", "futures-lite", - "gloo-timers", + "gloo-timers 0.3.0", "kv-log-macro", "log", "memchr", @@ -335,6 +335,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d2050892d4691cf110586070786712b504985a4d37ed64a9cd8a402718e1706" +[[package]] +name = "asyncband" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e53c31fb18f42e765610b2146531390e56966f601d8ffca530d292a34fe4218" + [[package]] name = "atomic" version = "0.6.1" @@ -1990,6 +1996,10 @@ name = "futures-timer" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" +dependencies = [ + "gloo-timers 0.4.1", + "send_wrapper", +] [[package]] name = "futures-util" @@ -2090,6 +2100,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gloo-timers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4460540da666acdb5722b2a62ac47d18f627fcfc0c728d04dc7226b3f6d40a7" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "governor" version = "0.10.4" @@ -3365,7 +3387,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d5a635dfea36a7a0c3bbb2ca34c97af17f98dd69b0cdf31a1d436a346e0a12" dependencies = [ "anyhow", - "asyncband", + "asyncband 0.7.4", "base64 0.23.1", "bytes", "futures", @@ -4325,12 +4347,15 @@ dependencies = [ [[package]] name = "reqsign-aws-core" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38c902d8ec745bd9eadd1abbcbe227f4c1fc2926b2ec8929f89234af3114500" +checksum = "ef1efa04a2b037d30bcb6fcefb0f45a4478d89c57c02bc7c2dc8276e19082b15" dependencies = [ + "asyncband 0.8.0", "bytes", "form_urlencoded", + "futures", + "futures-timer", "hex", "http 1.5.0", "log", @@ -4346,9 +4371,9 @@ dependencies = [ [[package]] name = "reqsign-aws-v4" -version = "3.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906bfd028f96bfe73fdb892ce26f3b3f99b4f30feb9bd024be58bd6657f68b2b" +checksum = "f30bc6afac5932e1c21763dd51fd593a86b242c5a83a8a12d428c0c2bef7819f" dependencies = [ "bytes", "http 1.5.0", @@ -4361,12 +4386,12 @@ dependencies = [ [[package]] name = "reqsign-core" -version = "3.3.2" +version = "3.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fed85c436b6b920e4b36310f699a77771a91e38ae483df48447bd7d162671c" +checksum = "5041e58962ebf1a1806a06f45735f1932c9dda25ac2814a59a1b4a3f619c7862" dependencies = [ "anyhow", - "asyncband", + "asyncband 0.8.0", "base64 0.23.1", "bytes", "hex", @@ -4382,9 +4407,9 @@ dependencies = [ [[package]] name = "reqsign-file-read-tokio" -version = "3.0.7" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "586a8e198057773f9616901fd723a4bc186812b9765bc0f20368661d6169d906" +checksum = "66743687bc0ccf687625a39fb8e2d0ddb404c5141ce4edf8636dd18dd5c75a58" dependencies = [ "anyhow", "reqsign-core", @@ -4486,9 +4511,9 @@ dependencies = [ [[package]] name = "rocket" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6f52722cade6c6423d6ad9ee5560a9ca2d888894f1bfef97f5b7f61c84f16b" +checksum = "b994aab1e1d2342ede2ee7a9be3aa18fc9eaa1c819d9a4b83cb6c5899f345bf8" dependencies = [ "async-stream", "async-trait", @@ -4524,9 +4549,9 @@ dependencies = [ [[package]] name = "rocket_codegen" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0df92d0cfe50ffd2b125dc8f5aa6ecbfa85f9e5f87aeceb46ca2fed8260d4fb" +checksum = "45c73d9cca43eac063ffb1e7f6b2ba52c777d8c5e63dbc6268610e3c8e217154" dependencies = [ "devise", "glob", @@ -4542,9 +4567,9 @@ dependencies = [ [[package]] name = "rocket_http" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92f626b274f1d3ade7e1162782e99dd920d04f797ea820ef75f3ffa5e8c2b78f" +checksum = "e87495dd15914c130bd1f90bba3c53f2b32535fc3b0203bf7a885c1259d973a3" dependencies = [ "cookie", "either", @@ -4886,6 +4911,12 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.229" @@ -5844,9 +5875,9 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "8f20bdbfc9915686faa18fb5bbe8b4552778505defbf9f12289beefbc44092a6" [[package]] name = "uncased" diff --git a/Cargo.toml b/Cargo.toml index 7edc8a63..4b01ff63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,7 @@ num-derive = "0.5.1" bigdecimal = "0.4.11" # Web framework -rocket = { version = "0.5.3", default-features = false, features = ["json", "tls"] } +rocket = { version = "0.5.4", default-features = false, features = ["json", "tls"] } rocket_ws = { version = "0.2.0" } # WebSockets libraries @@ -270,8 +270,8 @@ aws-config = { version = "1.13.3", optional = true, default-features = false, fe ] } aws-credential-types = { version = "1.3.1", optional = true } aws-smithy-runtime-api = { version = "1.22.0", optional = true } -reqsign-aws-v4 = { version = "3.3.1", optional = true } -reqsign-core = { version = "3.3.2", optional = true } +reqsign-aws-v4 = { version = "3.4.0", optional = true } +reqsign-core = { version = "3.3.3", optional = true } # Strip debuginfo from the release builds # The debug symbols are to provide better panic traces diff --git a/src/api/icons.rs b/src/api/icons.rs index 7e396a3b..e788d6b0 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -13,7 +13,11 @@ use reqwest::{ Client, Response, header::{self, HeaderMap, HeaderValue}, }; -use rocket::{Route, http::ContentType, response::Redirect}; +use rocket::{ + Route, + http::ContentType, + response::{Redirect, status::NotFound}, +}; use svg_hush::{Filter, data_url_filter}; use crate::{ @@ -106,33 +110,21 @@ fn icon_external(host: &str) -> Cached> { } #[get("//icon.png")] -async fn icon_internal(host: &str) -> Cached<(ContentType, Vec)> { - const FALLBACK_ICON: &[u8] = include_bytes!("../static/images/fallback-icon.png"); +async fn icon_internal(host: &str) -> Result)>, Cached>> { + let not_found = || Cached::ttl(NotFound(()), CONFIG.icon_cache_negttl(), true); let Ok(host) = get_valid_host(host) else { warn!("Invalid host: {}", host.escape_debug()); - return Cached::ttl( - (ContentType::new("image", "png"), FALLBACK_ICON.to_vec()), - CONFIG.icon_cache_negttl(), - true, - ); + return Err(not_found()); }; if should_block_host(&host).is_err() { warn!("Blocked address: {host}"); - return Cached::ttl( - (ContentType::new("image", "png"), FALLBACK_ICON.to_vec()), - CONFIG.icon_cache_negttl(), - true, - ); + return Err(not_found()); } - match get_icon(&host.to_string()).await { - Some((icon, icon_type)) => { - Cached::ttl((ContentType::new("image", icon_type), icon), CONFIG.icon_cache_ttl(), true) - } - _ => Cached::ttl((ContentType::new("image", "png"), FALLBACK_ICON.to_vec()), CONFIG.icon_cache_negttl(), true), - } + let (icon, icon_type) = get_icon(&host.to_string()).await.ok_or_else(not_found)?; + Ok(Cached::ttl((ContentType::new("image", icon_type), icon), CONFIG.icon_cache_ttl(), true)) } async fn get_icon(domain: &str) -> Option<(Vec, String)> { diff --git a/src/static/global_domains.json b/src/static/global_domains.json index 3b13a3e9..213a8a20 100644 --- a/src/static/global_domains.json +++ b/src/static/global_domains.json @@ -1,31 +1,4 @@ [ - { - "type": 2, - "domains": [ - "ameritrade.com", - "tdameritrade.com" - ], - "excluded": false - }, - { - "type": 3, - "domains": [ - "bankofamerica.com", - "bofa.com", - "mbna.com", - "usecfo.com" - ], - "excluded": false - }, - { - "type": 4, - "domains": [ - "sprint.com", - "sprintpcs.com", - "nextel.com" - ], - "excluded": false - }, { "type": 0, "domains": [ @@ -43,15 +16,6 @@ ], "excluded": false }, - { - "type": 5, - "domains": [ - "wellsfargo.com", - "wf.com", - "wellsfargoadvisors.com" - ], - "excluded": false - }, { "type": 6, "domains": [ @@ -61,40 +25,6 @@ ], "excluded": false }, - { - "type": 7, - "domains": [ - "accountonline.com", - "citi.com", - "citibank.com", - "citicards.com", - "citibankonline.com" - ], - "excluded": false - }, - { - "type": 8, - "domains": [ - "cnet.com", - "cnettv.com", - "com.com", - "download.com", - "news.com", - "search.com", - "upload.com" - ], - "excluded": false - }, - { - "type": 9, - "domains": [ - "bananarepublic.com", - "gap.com", - "oldnavy.com", - "piperlime.com" - ], - "excluded": false - }, { "type": 10, "domains": [ @@ -116,32 +46,6 @@ ], "excluded": false }, - { - "type": 11, - "domains": [ - "ua2go.com", - "ual.com", - "united.com", - "unitedwifi.com" - ], - "excluded": false - }, - { - "type": 12, - "domains": [ - "overture.com", - "yahoo.com" - ], - "excluded": false - }, - { - "type": 13, - "domains": [ - "zonealarm.com", - "zonelabs.com" - ], - "excluded": false - }, { "type": 14, "domains": [ @@ -150,39 +54,6 @@ ], "excluded": false }, - { - "type": 15, - "domains": [ - "avon.com", - "youravon.com" - ], - "excluded": false - }, - { - "type": 16, - "domains": [ - "diapers.com", - "soap.com", - "wag.com", - "yoyo.com", - "beautybar.com", - "casa.com", - "afterschool.com", - "vine.com", - "bookworm.com", - "look.com", - "vinemarket.com" - ], - "excluded": false - }, - { - "type": 17, - "domains": [ - "1800contacts.com", - "800contacts.com" - ], - "excluded": false - }, { "type": 18, "domains": [ @@ -208,149 +79,6 @@ ], "excluded": false }, - { - "type": 19, - "domains": [ - "cox.com", - "cox.net", - "coxbusiness.com" - ], - "excluded": false - }, - { - "type": 20, - "domains": [ - "mynortonaccount.com", - "norton.com" - ], - "excluded": false - }, - { - "type": 21, - "domains": [ - "verizon.com", - "verizon.net" - ], - "excluded": false - }, - { - "type": 22, - "domains": [ - "rakuten.com", - "buy.com" - ], - "excluded": false - }, - { - "type": 23, - "domains": [ - "siriusxm.com", - "sirius.com" - ], - "excluded": false - }, - { - "type": 24, - "domains": [ - "ea.com", - "origin.com", - "play4free.com", - "tiberiumalliance.com" - ], - "excluded": false - }, - { - "type": 25, - "domains": [ - "37signals.com", - "basecamp.com", - "basecamphq.com", - "highrisehq.com" - ], - "excluded": false - }, - { - "type": 26, - "domains": [ - "steampowered.com", - "steamcommunity.com", - "steamgames.com" - ], - "excluded": false - }, - { - "type": 27, - "domains": [ - "chart.io", - "chartio.com" - ], - "excluded": false - }, - { - "type": 28, - "domains": [ - "gotomeeting.com", - "citrixonline.com" - ], - "excluded": false - }, - { - "type": 29, - "domains": [ - "gogoair.com", - "gogoinflight.com" - ], - "excluded": false - }, - { - "type": 30, - "domains": [ - "mysql.com", - "oracle.com" - ], - "excluded": false - }, - { - "type": 31, - "domains": [ - "discover.com", - "discovercard.com" - ], - "excluded": false - }, - { - "type": 32, - "domains": [ - "dcu.org", - "dcu-online.org" - ], - "excluded": false - }, - { - "type": 33, - "domains": [ - "healthcare.gov", - "cuidadodesalud.gov", - "cms.gov" - ], - "excluded": false - }, - { - "type": 34, - "domains": [ - "pepco.com", - "pepcoholdings.com" - ], - "excluded": false - }, - { - "type": 35, - "domains": [ - "century21.com", - "21online.com" - ], - "excluded": false - }, { "type": 36, "domains": [ @@ -360,38 +88,6 @@ ], "excluded": false }, - { - "type": 37, - "domains": [ - "cricketwireless.com", - "aiowireless.com" - ], - "excluded": false - }, - { - "type": 38, - "domains": [ - "mandtbank.com", - "mtb.com" - ], - "excluded": false - }, - { - "type": 39, - "domains": [ - "dropbox.com", - "getdropbox.com" - ], - "excluded": false - }, - { - "type": 40, - "domains": [ - "snapfish.com", - "snapfish.ca" - ], - "excluded": false - }, { "type": 41, "domains": [ @@ -402,33 +98,6 @@ ], "excluded": false }, - { - "type": 42, - "domains": [ - "playstation.com", - "sonyentertainmentnetwork.com" - ], - "excluded": false - }, - { - "type": 43, - "domains": [ - "mercadolivre.com", - "mercadolivre.com.br", - "mercadolibre.com", - "mercadolibre.com.ar", - "mercadolibre.com.mx" - ], - "excluded": false - }, - { - "type": 44, - "domains": [ - "zendesk.com", - "zopim.com" - ], - "excluded": false - }, { "type": 45, "domains": [ @@ -437,60 +106,6 @@ ], "excluded": false }, - { - "type": 46, - "domains": [ - "railnation.ru", - "railnation.de", - "rail-nation.com", - "railnation.gr", - "railnation.us", - "trucknation.de", - "traviangames.com" - ], - "excluded": false - }, - { - "type": 47, - "domains": [ - "wpcu.coop", - "wpcuonline.com" - ], - "excluded": false - }, - { - "type": 48, - "domains": [ - "mathletics.com", - "mathletics.com.au", - "mathletics.co.uk" - ], - "excluded": false - }, - { - "type": 49, - "domains": [ - "discountbank.co.il", - "telebank.co.il" - ], - "excluded": false - }, - { - "type": 50, - "domains": [ - "mi.com", - "xiaomi.com" - ], - "excluded": false - }, - { - "type": 52, - "domains": [ - "postepay.it", - "poste.it" - ], - "excluded": false - }, { "type": 51, "domains": [ @@ -499,15 +114,6 @@ ], "excluded": false }, - { - "type": 53, - "domains": [ - "skysports.com", - "skybet.com", - "skyvegas.com" - ], - "excluded": false - }, { "type": 54, "domains": [ @@ -519,62 +125,6 @@ ], "excluded": false }, - { - "type": 55, - "domains": [ - "pokemon-gl.com", - "pokemon.com" - ], - "excluded": false - }, - { - "type": 56, - "domains": [ - "myuv.com", - "uvvu.com" - ], - "excluded": false - }, - { - "type": 58, - "domains": [ - "mdsol.com", - "imedidata.com" - ], - "excluded": false - }, - { - "type": 57, - "domains": [ - "bank-yahav.co.il", - "bankhapoalim.co.il" - ], - "excluded": false - }, - { - "type": 59, - "domains": [ - "sears.com", - "shld.net" - ], - "excluded": false - }, - { - "type": 60, - "domains": [ - "xiami.com", - "alipay.com" - ], - "excluded": false - }, - { - "type": 61, - "domains": [ - "belkin.com", - "seedonk.com" - ], - "excluded": false - }, { "type": 62, "domains": [ @@ -583,14 +133,6 @@ ], "excluded": false }, - { - "type": 63, - "domains": [ - "shopify.com", - "myshopify.com" - ], - "excluded": false - }, { "type": 64, "domains": [ @@ -620,30 +162,6 @@ ], "excluded": false }, - { - "type": 65, - "domains": [ - "techdata.com", - "techdata.ch" - ], - "excluded": false - }, - { - "type": 66, - "domains": [ - "schwab.com", - "schwabplan.com" - ], - "excluded": false - }, - { - "type": 68, - "domains": [ - "tesla.com", - "teslamotors.com" - ], - "excluded": false - }, { "type": 69, "domains": [ @@ -654,31 +172,6 @@ ], "excluded": false }, - { - "type": 70, - "domains": [ - "taxact.com", - "taxactonline.com" - ], - "excluded": false - }, - { - "type": 71, - "domains": [ - "mediawiki.org", - "wikibooks.org", - "wikidata.org", - "wikimedia.org", - "wikinews.org", - "wikipedia.org", - "wikiquote.org", - "wikisource.org", - "wikiversity.org", - "wikivoyage.org", - "wiktionary.org" - ], - "excluded": false - }, { "type": 72, "domains": [ @@ -738,38 +231,6 @@ ], "excluded": false }, - { - "type": 73, - "domains": [ - "eventbrite.at", - "eventbrite.be", - "eventbrite.ca", - "eventbrite.ch", - "eventbrite.cl", - "eventbrite.co", - "eventbrite.co.nz", - "eventbrite.co.uk", - "eventbrite.com", - "eventbrite.com.ar", - "eventbrite.com.au", - "eventbrite.com.br", - "eventbrite.com.mx", - "eventbrite.com.pe", - "eventbrite.de", - "eventbrite.dk", - "eventbrite.es", - "eventbrite.fi", - "eventbrite.fr", - "eventbrite.hk", - "eventbrite.ie", - "eventbrite.it", - "eventbrite.nl", - "eventbrite.pt", - "eventbrite.se", - "eventbrite.sg" - ], - "excluded": false - }, { "type": 74, "domains": [ @@ -791,56 +252,6 @@ ], "excluded": false }, - { - "type": 76, - "domains": [ - "envato.com", - "themeforest.net", - "codecanyon.net", - "videohive.net", - "audiojungle.net", - "graphicriver.net", - "photodune.net", - "3docean.net" - ], - "excluded": false - }, - { - "type": 77, - "domains": [ - "x10hosting.com", - "x10premium.com" - ], - "excluded": false - }, - { - "type": 78, - "domains": [ - "dnsomatic.com", - "opendns.com", - "umbrella.com" - ], - "excluded": false - }, - { - "type": 79, - "domains": [ - "cagreatamerica.com", - "canadaswonderland.com", - "carowinds.com", - "cedarfair.com", - "cedarpoint.com", - "dorneypark.com", - "kingsdominion.com", - "knotts.com", - "miadventure.com", - "schlitterbahn.com", - "valleyfair.com", - "visitkingsisland.com", - "worldsoffun.com" - ], - "excluded": false - }, { "type": 80, "domains": [ @@ -849,23 +260,6 @@ ], "excluded": false }, - { - "type": 81, - "domains": [ - "discordapp.com", - "discord.com" - ], - "excluded": false - }, - { - "type": 82, - "domains": [ - "netcup.de", - "netcup.eu", - "customercontrolpanel.de" - ], - "excluded": false - }, { "type": 83, "domains": [ @@ -894,14 +288,6 @@ ], "excluded": false }, - { - "type": 84, - "domains": [ - "sonyentertainmentnetwork.com", - "sony.com" - ], - "excluded": false - }, { "type": 85, "domains": [ @@ -911,37 +297,6 @@ ], "excluded": false }, - { - "type": 86, - "domains": [ - "ubisoft.com", - "ubi.com" - ], - "excluded": false - }, - { - "type": 87, - "domains": [ - "transferwise.com", - "wise.com" - ], - "excluded": false - }, - { - "type": 88, - "domains": [ - "takeaway.com", - "just-eat.dk", - "just-eat.no", - "just-eat.fr", - "just-eat.ch", - "lieferando.de", - "lieferando.at", - "thuisbezorgd.nl", - "pyszne.pl" - ], - "excluded": false - }, { "type": 89, "domains": [ @@ -954,25 +309,6 @@ ], "excluded": false }, - { - "type": 90, - "domains": [ - "pinterest.com", - "pinterest.com.au", - "pinterest.cl", - "pinterest.de", - "pinterest.dk", - "pinterest.es", - "pinterest.fr", - "pinterest.co.uk", - "pinterest.jp", - "pinterest.co.kr", - "pinterest.nz", - "pinterest.pt", - "pinterest.se" - ], - "excluded": false - }, { "type": 91, "domains": [ diff --git a/src/static/images/fallback-icon.png b/src/static/images/fallback-icon.png deleted file mode 100644 index 7fb0b454201feacfe6906067231d545044e43b53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 483 zcmV<90UZ8`P)I#ZQHhO+YW2@&+I(E{dUJE=TZ`(G{y;D^MhCJ zYEh*mB@?ph9KLgc@!G&DStmYooo_m8LRLv+d|}RVJEEEd(33$TUM=o&W_;lUCnx$z zO>vCLA6Y~sq5wxUmx$)#u$~@~#h1Bo53D|0G(z{Vj%Dn(ZJZ*Hh%da$%uwRraZXl& zCKIv;{uw)DkN~a6H&+bC1qnlk47%Dme>8*>EOvPWSQ$n!U_$!9DNg%|*f@>}uWczu z#uaqwXVZDMT-)0ijS~mubgek7KCgryR>i8Y)f%&(Mt)}5ZCj`|myxv7?sHYp$~-8Kd)Z*p83M zmarjuntNO)PqG~AbCfs;>Y5002ovPDHLkV1g04+9&`3 diff --git a/src/static/scripts/datatables.css b/src/static/scripts/datatables.css index 81827eed..35bafdb1 100644 --- a/src/static/scripts/datatables.css +++ b/src/static/scripts/datatables.css @@ -4,10 +4,10 @@ * * To rebuild or modify this file with the latest versions of the included * software please visit: - * https://datatables.net/download/#bs5/dt-3.1.4 + * https://datatables.net/download/#bs5/dt-3.1.5 * * Included libraries: - * DataTables 3.1.4 + * DataTables 3.1.5 */ /*! DataTables Bootstrap 5 integration diff --git a/src/static/scripts/datatables.js b/src/static/scripts/datatables.js index 8dc93bd6..f47b2d63 100644 --- a/src/static/scripts/datatables.js +++ b/src/static/scripts/datatables.js @@ -4,13 +4,13 @@ * * To rebuild or modify this file with the latest versions of the included * software please visit: - * https://datatables.net/download/#bs5/dt-3.1.4 + * https://datatables.net/download/#bs5/dt-3.1.5 * * Included libraries: - * DataTables 3.1.4 + * DataTables 3.1.5 */ -/*! DataTables 3.1.4 +/*! DataTables 3.1.5 * Copyright (c) SpryMedia Ltd - datatables.net/license */ @@ -22,9 +22,6 @@ }); } else if (typeof exports === 'object') { - // CommonJS - var cjsRequires = function (root) { }; - if (typeof window === 'undefined') { module.exports = function (root) { if (! root) { @@ -32,13 +29,11 @@ // root. This will give an error otherwise root = window; } - - cjsRequires(root); + return factory(root, root.document); }; } else { - cjsRequires(window); module.exports = factory(window, window.document); } } @@ -276,7 +271,7 @@ function dom(input) { * @returns true if an HTML element was passed in */ function element(input) { - return typeof input === 'object' && input.nodeName; + return input && typeof input === 'object' && input.nodeName; } /** * Check if a value is empty or not. Note that a string with `-` is considered @@ -767,7 +762,7 @@ function ajax(optionsIn) { // noop } } - if (statusText === 'success') { + if (statusText === 'success' || statusText === 'nocontent') { callback(options.success, responseData, statusText, xhr); } else { @@ -8720,7 +8715,7 @@ const ext = { /** * DataTables build type (expanded by the download builder) */ - builder: 'bs5/dt-3.1.4', + builder: 'bs5/dt-3.1.5', /** * Buttons. For use with the Buttons extension for DataTables. This is * defined here so other extensions can define buttons regardless of load @@ -8866,7 +8861,7 @@ const ext = { * Software version * @type string */ - version: '3.1.4' + version: '3.1.5' }; // // Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts @@ -9535,8 +9530,10 @@ register('ready()', function (fn) { fn.call(api); } else { - this.on('init.dt.DT', function () { - fn.call(api); + this.on('init.dt.DT', function (e, s) { + if (ctx.includes(s)) { + fn.call(api); + } }); } }); @@ -10803,14 +10800,12 @@ function selectRows(settings, selector, opts) { } } // ID selector. Want to always be able to select rows by id, regardless - // of if the tr element has been created or not, so can't rely upon - // jQuery here - hence a custom implementation. This does not match - // Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything, - // but to select it using a CSS selector engine (like Sizzle or - // querySelect) it would need to need to be escaped for some characters. - // DataTables simplifies this for row selectors since you can select - // only a row. A # indicates an id any anything that follows is the id - - // unescaped. + // of if the tr element has been created or not, so can't rely upon the + // DOM here - hence a custom implementation. In HTML5 the ID can be + // anything, but to select it using a CSS selector engine it would need + // to need to be escaped for some characters. DataTables simplifies this + // for row selectors since you can select only a row. A # indicates an + // id any anything that follows is the id - unescaped. if (typeof sel === 'string') { if (sel.charAt(0) === '#') { // get row index from id @@ -10818,6 +10813,13 @@ function selectRows(settings, selector, opts) { if (rowObj !== undefined) { return [rowObj.idx]; } + // If it was a basic ID selector, and it didn't match, in the + // above, then return here, as it won't match at all. Note that + // this check is slightly less restrictive than CSS IDs, in that + // it allows a leading digit or dash to be used. + if (sel.match(/^#[a-zA-Z0-9_-]*$/)) { + return []; + } // need to fall through to selector in case there is DOM id that // matches } @@ -12506,19 +12508,22 @@ const DataTable = function (selector, options) { if (factory(selector, options)) { return DataTable; } - // Allow access to the API from the core class - this.api = () => { - return new Api(selector); - }; // Backwards compatibility with this "class" being exposed as // `$().dataTable()`. We can't simply provide that as a wrapper, as there // are properties on this class which are expected to be exposed. if (typeof this.jquery === 'string') { + let els = this.toArray(); // Typescript doesn't like the `return api` from the constructor, but is // it valid Javascript, and allows backwards compatibility, hence the any - new DataTable(this.toArray(), selector); // note argument shift + new DataTable(els, selector); // note argument shift + // jQuery specific api method + this.api = () => new Api(els); return this; } + // Allow access to the API from the core class + this.api = () => { + return new Api(selector); + }; var emptyInit = options === undefined; let tableEls = Dom.s(selector); let len = tableEls.count(); @@ -12963,13 +12968,6 @@ return DataTable; }); } else if (typeof exports === 'object') { - // CommonJS - var cjsRequires = function (root) { - if (! root.DataTable) { - require('datatables.net')(root); - } - }; - if (typeof window === 'undefined') { module.exports = function (root) { if (! root) { @@ -12977,14 +12975,20 @@ return DataTable; // root. This will give an error otherwise root = window; } + + var DataTable = root.DataTable ? + root.DataTable : + require('datatables.net')(root); - cjsRequires(root); - return factory(root, root.document, root.DataTable); + return factory(root, root.document, DataTable); }; } else { - cjsRequires(window); - module.exports = factory(window, window.document, window.DataTable); + var DataTable = window.DataTable ? + window.DataTable : + require('datatables.net'); + + module.exports = factory(window, window.document, DataTable); } } else {