From 4cd8837cde85951e7e7d3b85cf42430e09ae3522 Mon Sep 17 00:00:00 2001 From: Shiven Garia Date: Thu, 18 Jun 2026 23:09:59 +0530 Subject: [PATCH 1/5] Replace forked jsonwebtoken crates --- Cargo.lock | 927 ++++++++++++++++++++++++++++++++++++++--------------- Cargo.toml | 4 +- 2 files changed, 674 insertions(+), 257 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f9e9ae7a3e..0c7e63fb74e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -346,6 +346,28 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-lc-rs" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "axum" version = "0.7.9" @@ -356,10 +378,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.7.0", + "hyper", "hyper-util", "itoa", "matchit", @@ -372,7 +394,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower", "tower-layer", @@ -389,13 +411,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -413,8 +435,8 @@ dependencies = [ "fastrand", "futures-util", "headers", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "multer", @@ -446,6 +468,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a17bd29f7c70f32e9387f4d4acfa5ea7b7749ef784fb78cf382df97069337b8c" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.21.7" @@ -468,6 +496,12 @@ dependencies = [ "vsimd", ] +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "basic-rs-template-module" version = "0.1.0" @@ -522,7 +556,7 @@ dependencies = [ "quote", "regex", "rustc-hash", - "shlex", + "shlex 1.3.0", "syn 2.0.107", ] @@ -823,14 +857,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.41" +version = "1.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f" dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex", + "shlex 2.0.1", ] [[package]] @@ -1060,6 +1094,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + [[package]] name = "cobs" version = "0.3.0" @@ -1175,6 +1218,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -1549,6 +1598,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1607,6 +1668,33 @@ dependencies = [ "xi-unicode", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "custom_debug" version = "0.5.1" @@ -1727,6 +1815,17 @@ version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9efff8990a82c1ae664292507e1a5c6749ddd2312898cdf9cd7cb1fd4bc64c6" +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + [[package]] name = "deranged" version = "0.5.4" @@ -1824,6 +1923,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -1937,12 +2037,56 @@ dependencies = [ "shared_child", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "educe" version = "0.4.23" @@ -1961,6 +2105,27 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "email_address" version = "0.2.9" @@ -2262,6 +2427,22 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" version = "0.2.26" @@ -2276,9 +2457,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" @@ -2557,6 +2738,7 @@ checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2607,7 +2789,7 @@ dependencies = [ "libc", "libgit2-sys", "log", - "openssl-probe", + "openssl-probe 0.1.6", "openssl-sys", "url", ] @@ -2654,7 +2836,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 1.3.1", + "http", "js-sys", "pin-project", "serde", @@ -2706,31 +2888,23 @@ dependencies = [ ] [[package]] -name = "gzip-header" -version = "1.0.0" +name = "group" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "crc32fast", + "ff", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "h2" -version = "0.3.27" +name = "gzip-header" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.12.0", - "slab", - "tokio", - "tokio-util", - "tracing", + "crc32fast", ] [[package]] @@ -2744,7 +2918,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.3.1", + "http", "indexmap 2.12.0", "slab", "tokio", @@ -2835,7 +3009,7 @@ dependencies = [ "base64 0.22.1", "bytes", "headers-core", - "http 1.3.1", + "http", "httpdate", "mime", "sha1", @@ -2847,7 +3021,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.3.1", + "http", ] [[package]] @@ -2883,6 +3057,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -2912,17 +3095,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.3.1" @@ -2934,17 +3106,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -2952,7 +3113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http", ] [[package]] @@ -2963,8 +3124,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -2986,30 +3147,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.7.0" @@ -3020,9 +3157,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -3039,8 +3176,8 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.7.0", + "http", + "hyper", "hyper-util", "rustls", "rustls-pki-types", @@ -3049,19 +3186,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.32", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -3070,7 +3194,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.7.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -3089,15 +3213,15 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "hyper 1.7.0", + "http", + "http-body", + "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", "socket2 0.6.1", - "system-configuration 0.6.1", + "system-configuration", "tokio", "tower-service", "tracing", @@ -3145,7 +3269,7 @@ dependencies = [ "sanitize-filename", "serde", "serde_json", - "shlex", + "shlex 1.3.0", "tempfile", "version-compare", "which 4.4.2", @@ -3522,16 +3646,6 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -[[package]] -name = "iri-string" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is-terminal" version = "0.4.16" @@ -3632,19 +3746,68 @@ dependencies = [ "cesu8", "cfg-if", "combine", - "jni-sys", + "jni-sys 0.3.0", "log", "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.17", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.107", +] + [[package]] name = "jni-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.107", +] + [[package]] name = "jobserver" version = "0.1.34" @@ -3691,6 +3854,30 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "10.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc" +dependencies = [ + "base64 0.22.1", + "ed25519-dalek", + "getrandom 0.2.16", + "hmac", + "js-sys", + "p256", + "p384", + "pem", + "rand 0.8.5", + "rsa", + "serde", + "serde_json", + "sha2", + "signature", + "simple_asn1", + "zeroize", +] + [[package]] name = "junction" version = "1.3.0" @@ -3701,6 +3888,19 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "jwks" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4cf2e9dd754c698b41139c2ec88304249ecf3dd15cabfeddd48665cdf5c0c" +dependencies = [ + "base64 0.22.1", + "jsonwebtoken", + "reqwest 0.13.4", + "serde", + "thiserror 2.0.17", +] + [[package]] name = "keccak" version = "0.1.5" @@ -3766,6 +3966,9 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] [[package]] name = "lean_string" @@ -3956,6 +4159,12 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "lzma-rs" version = "0.3.0" @@ -4133,7 +4342,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.3.1", + "http", "httparse", "memchr", "mime", @@ -4180,10 +4389,10 @@ dependencies = [ "libc", "log", "openssl", - "openssl-probe", + "openssl-probe 0.1.6", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -4403,6 +4612,22 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + [[package]] name = "num-complex" version = "0.4.6" @@ -4477,6 +4702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -4610,6 +4836,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + [[package]] name = "openssl-src" version = "300.5.3+3.5.4" @@ -5184,6 +5416,30 @@ dependencies = [ "rustc-hash", ] +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "papaya" version = "0.2.3" @@ -5303,6 +5559,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -5494,6 +5759,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.32" @@ -5723,6 +6009,15 @@ dependencies = [ "syn 2.0.107", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -6027,6 +6322,62 @@ dependencies = [ "spacetimedb", ] +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.6.1", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.1", + "tracing", + "windows-sys 0.60.2", +] + [[package]] name = "quote" version = "1.0.41" @@ -6356,85 +6707,82 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-tls 0.5.0", - "ipnet", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", "js-sys", "log", "mime", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", + "sync_wrapper", "tokio", "tokio-native-tls", + "tokio-util", + "tower", + "tower-http 0.6.11", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", - "winreg", ] [[package]] name = "reqwest" -version = "0.12.24" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", - "encoding_rs", - "futures-channel", "futures-core", - "futures-util", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.7.0", + "hyper", "hyper-rustls", - "hyper-tls 0.6.0", "hyper-util", "js-sys", "log", - "mime", - "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pki-types", + "rustls-platform-verifier", "serde", "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tokio-native-tls", - "tokio-util", + "tokio-rustls", "tower", - "tower-http 0.6.6", + "tower-http 0.6.11", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", ] @@ -6448,6 +6796,16 @@ dependencies = [ "serde_core", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "rgb" version = "0.8.52" @@ -6934,6 +7292,26 @@ dependencies = [ "str_indices", ] +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rusqlite" version = "0.29.0" @@ -7018,6 +7396,7 @@ version = "0.23.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "751e04a496ca00bb97a5e043158d23d66b5aabf2e1d5aa2a0aaebb1aafe6f82c" dependencies = [ + "aws-lc-rs", "once_cell", "rustls-pki-types", "rustls-webpki", @@ -7026,12 +7405,15 @@ dependencies = [ ] [[package]] -name = "rustls-pemfile" -version = "1.0.4" +name = "rustls-native-certs" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ - "base64 0.21.7", + "openssl-probe 0.2.1", + "rustls-pki-types", + "schannel", + "security-framework 3.5.1", ] [[package]] @@ -7040,15 +7422,44 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ + "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni 0.22.4", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework 3.5.1", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.103.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -7248,6 +7659,20 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "second-stack" version = "0.3.5" @@ -7267,6 +7692,19 @@ dependencies = [ "security-framework-sys", ] +[[package]] +name = "security-framework" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +dependencies = [ + "bitflags 2.10.0", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + [[package]] name = "security-framework-sys" version = "2.15.0" @@ -7525,6 +7963,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "sigchld" version = "0.2.4" @@ -7566,6 +8010,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -7584,6 +8038,16 @@ dependencies = [ "value-trait", ] +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + [[package]] name = "simdutf8" version = "0.1.5" @@ -7716,7 +8180,7 @@ dependencies = [ "bytes", "derive_more 0.99.20", "getrandom 0.2.16", - "http 1.3.1", + "http", "insta", "log", "rand 0.8.5", @@ -7735,11 +8199,11 @@ name = "spacetimedb-auth" version = "2.6.0" dependencies = [ "anyhow", + "jsonwebtoken", "serde", "serde_json", "serde_with", "spacetimedb-data-structures", - "spacetimedb-jsonwebtoken", "spacetimedb-lib", ] @@ -7836,12 +8300,13 @@ dependencies = [ "futures", "git2", "glob", - "http 1.3.1", + "http", "ignore", "indicatif", "is-terminal", "itertools 0.12.1", "json5", + "jsonwebtoken", "mimalloc", "names", "notify", @@ -7865,7 +8330,6 @@ dependencies = [ "spacetimedb-codegen", "spacetimedb-data-structures", "spacetimedb-fs-utils", - "spacetimedb-jsonwebtoken", "spacetimedb-lib", "spacetimedb-paths", "spacetimedb-primitives", @@ -7909,13 +8373,14 @@ dependencies = [ "email_address", "futures", "headers", - "http 1.3.1", + "http", "http-body-util", "humantime", - "hyper 1.7.0", + "hyper", "hyper-util", "itoa", "jemalloc_pprof", + "jsonwebtoken", "lazy_static", "log", "mime", @@ -7932,7 +8397,6 @@ dependencies = [ "spacetimedb-core", "spacetimedb-data-structures", "spacetimedb-datastore", - "spacetimedb-jsonwebtoken", "spacetimedb-lib", "spacetimedb-paths", "spacetimedb-schema", @@ -8061,13 +8525,15 @@ dependencies = [ "futures-util", "hex", "hostname", - "http 1.3.1", + "http", "http-body-util", "humantime", - "hyper 1.7.0", + "hyper", "imara-diff", "indexmap 2.12.0", "itertools 0.12.1", + "jsonwebtoken", + "jwks", "lazy_static", "log", "memchr", @@ -8111,8 +8577,6 @@ dependencies = [ "spacetimedb-execution", "spacetimedb-expr", "spacetimedb-fs-utils", - "spacetimedb-jsonwebtoken", - "spacetimedb-jwks", "spacetimedb-lib", "spacetimedb-memory-usage", "spacetimedb-metrics", @@ -8328,35 +8792,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "spacetimedb-jsonwebtoken" -version = "9.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f626b7b56a60c3ec4552bc928a4e26b12ec76af826c0b152a87811fb4a68544f" -dependencies = [ - "base64 0.22.1", - "js-sys", - "pem", - "ring", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "spacetimedb-jwks" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87fbe70b43e34cb9ee9db5e6fdffab259932fa931fcf8283fd9e92d7c117c93" -dependencies = [ - "base64 0.22.1", - "reqwest 0.11.27", - "serde", - "spacetimedb-jsonwebtoken", - "thiserror 1.0.69", - "tokio", -] - [[package]] name = "spacetimedb-lib" version = "2.6.0" @@ -8430,7 +8865,7 @@ dependencies = [ "async-trait", "axum", "futures", - "http 1.3.1", + "http", "log", "pgwire", "spacetimedb-auth", @@ -8594,14 +9029,14 @@ dependencies = [ "gloo-utils", "hex", "home", - "http 1.3.1", + "http", "js-sys", "log", "native-tls", "once_cell", "prometheus", "rand 0.9.2", - "shlex", + "shlex 1.3.0", "spacetimedb-client-api-messages", "spacetimedb-data-structures", "spacetimedb-lib", @@ -8696,7 +9131,7 @@ dependencies = [ "dirs", "futures", "hostname", - "http 1.3.1", + "http", "log", "netstat2", "once_cell", @@ -8835,6 +9270,16 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqllogictest" version = "0.17.2" @@ -9073,12 +9518,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -9132,17 +9571,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys 0.5.0", -] - [[package]] name = "system-configuration" version = "0.6.1" @@ -9151,17 +9579,7 @@ checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.10.0", "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -9654,7 +10072,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.3.1", + "http", "httparse", "js-sys", "thiserror 2.0.17", @@ -9788,7 +10206,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -9803,8 +10221,8 @@ checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.10.0", "bytes", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "tower-layer", @@ -9813,20 +10231,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "bitflags 2.10.0", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "iri-string", + "http", + "http-body", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -10043,7 +10461,7 @@ checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ "bytes", "data-encoding", - "http 1.3.1", + "http", "httparse", "log", "rand 0.9.2", @@ -10060,7 +10478,7 @@ checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ "bytes", "data-encoding", - "http 1.3.1", + "http", "httparse", "log", "native-tls", @@ -10804,7 +11222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00f1243ef785213e3a32fa0396093424a3a6ea566f9948497e5a2309261a4c97" dependencies = [ "core-foundation 0.10.1", - "jni", + "jni 0.21.1", "log", "ndk-context", "objc2", @@ -10813,6 +11231,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "4.4.2" @@ -11406,16 +11833,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winsafe" version = "0.0.19" diff --git a/Cargo.toml b/Cargo.toml index 3f877c82330..96a4171c7ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -233,9 +233,9 @@ is-terminal = "0.4" itertools = "0.12" itoa = "1" json5 = "0.4" -jsonwebtoken = { package = "spacetimedb-jsonwebtoken", version = "9.3.0" } +jsonwebtoken = "10.4.0" junction = "1" -jwks = { package = "spacetimedb-jwks", version = "0.1.3" } +jwks = "0.5.3" lazy_static = "1.4.0" lean_string = "0.5.1" log = "0.4.17" From 94ce98d66005c3a6923f5f4358449f0d01f49d6c Mon Sep 17 00:00:00 2001 From: Shiven Garia Date: Wed, 24 Jun 2026 16:09:49 +0530 Subject: [PATCH 2/5] fix(git-hooks): prefer core.hooksPath and avoid symlink on Windows --- .../ISSUES/0001-git-hooks-installer-bug.md | 45 +++++++++++++++++++ git-hooks/install-hooks.sh | 29 +++++++++--- 2 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 .github/ISSUES/0001-git-hooks-installer-bug.md diff --git a/.github/ISSUES/0001-git-hooks-installer-bug.md b/.github/ISSUES/0001-git-hooks-installer-bug.md new file mode 100644 index 00000000000..ecd04b6a561 --- /dev/null +++ b/.github/ISSUES/0001-git-hooks-installer-bug.md @@ -0,0 +1,45 @@ +Title: Hook installer removes .git/hooks and uses symlink — breaks on Windows; prefer git core.hooksPath + +Summary +------- +`git-hooks/install-hooks.sh` unconditionally removes `../.git/hooks` and attempts to create a symlink to `../git-hooks/hooks`. On Windows (and some restricted environments) creating symlinks requires elevated privileges or is unsupported, and the script can unintentionally remove existing hooks. This causes the installer to fail or damage developer setups. + +Steps to reproduce +------------------ +1. On a Windows machine without symlink privileges, run from repo root: + +```bash +bash git-hooks/install-hooks.sh +``` + +2. Observe that `ln -s` fails (or that `.git/hooks` was removed), and that hooks are not installed. + +Expected behavior +----------------- +- Installer should set up hooks in a cross-platform way without requiring symlink privileges and without deleting existing hooks unless explicitly requested. + +Proposed fix +------------ +- Use `git config core.hooksPath git-hooks/hooks` by default (works cross-platform and avoids symlinks). +- Only attempt a symlink as a fallback when `git` is not available, and show a clear warning. +- Only run `rustup component add rustfmt` if `rustup` is installed. + +Acceptance criteria +------------------- +- Running `bash git-hooks/install-hooks.sh` configures hooks for normal Git clients on Linux/macOS/Windows without requiring symlink privileges. +- Existing `.git/hooks` is not accidentally deleted without fallback/config instructions. +- The repository documentation includes a short note about installing hooks (optional follow-up). + +Suggested labels +---------------- +- bug +- platform-windows +- good first issue + +Suggested assignee +------------------ +- Leave unassigned or assign to core-maintainers + +Patch / PR +---------- +I have a proposed patch that updates `git-hooks/install-hooks.sh` to prefer `git config core.hooksPath` and to guard `rustup` usage. The patch is ready in a branch `fix/git-hooks-installer`. diff --git a/git-hooks/install-hooks.sh b/git-hooks/install-hooks.sh index 737c174d152..2bef4de0cb2 100755 --- a/git-hooks/install-hooks.sh +++ b/git-hooks/install-hooks.sh @@ -1,9 +1,28 @@ #!/bin/bash -rustup component add rustfmt +set -euo pipefail -cd "$(dirname "$0")" +# Add rustfmt if rustup is available (non-fatal if it fails) +if command -v rustup >/dev/null 2>&1; then + rustup component add rustfmt || true +fi -rm -rf ../.git/hooks -# Soft link the .git/hooks directory onto hooks/ -ln -s ../git-hooks/hooks ../.git/hooks +# Change to repo root (parent of this script's dir) +cd "$(dirname "$0")/.." +REPO_ROOT="$(pwd -P)" + +# Prefer configuring Git's hooks path (cross-platform) instead of creating a symlink. +# This avoids symlink requirements on Windows and preserves existing .git/hooks behavior. +if command -v git >/dev/null 2>&1; then + git -C "$REPO_ROOT" config core.hooksPath git-hooks/hooks + echo "Configured Git core.hooksPath to git-hooks/hooks" +else + # Fallback: attempt to replace .git/hooks with a symlink (may require privileges on Windows) + rm -rf "$REPO_ROOT/.git/hooks" + if ln -s "git-hooks/hooks" "$REPO_ROOT/.git/hooks" 2>/dev/null; then + echo "Created symlink .git/hooks -> git-hooks/hooks" + else + echo "Warning: could not create symlink .git/hooks -> git-hooks/hooks." + echo "Please run: git config core.hooksPath git-hooks/hooks" + fi +fi From 24cfec10d50f785abc2aa965eb0d01279025e277 Mon Sep 17 00:00:00 2001 From: Shiven Garia Date: Wed, 24 Jun 2026 16:35:56 +0530 Subject: [PATCH 3/5] docs: document installing Git hooks (use core.hooksPath) --- docs/DEVELOP.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/DEVELOP.md b/docs/DEVELOP.md index 3ee7a261572..3832dce0483 100644 --- a/docs/DEVELOP.md +++ b/docs/DEVELOP.md @@ -308,3 +308,29 @@ When writing documentation that will be used by the benchmark: **Timeouts / Rate-limits** - Lower `LLM_BENCH_CONCURRENCY` or `LLM_BENCH_ROUTE_CONCURRENCY`. - Some providers aggressively throttle bursts; use backoff/retry when supported. + +--- + +## Installing Git hooks + +The repository provides `git-hooks/install-hooks.sh` to configure developer Git hooks. + +- Recommended (cross-platform): run the installer to configure Git to use the bundled hooks directory without creating symlinks: + +```bash +# from the repo root +bash git-hooks/install-hooks.sh + +# verify +git config --get core.hooksPath +``` + +- What it does: the installer prefers `git config core.hooksPath git-hooks/hooks`, which works on Linux, macOS, and Windows (Git for Windows) and avoids requiring filesystem symlink privileges. + +- If you need to revert: + +```bash +git config --unset core.hooksPath +``` + +- If your environment does not have `git` on PATH, the installer will try to create a symlink as a fallback and will print a warning; prefer running the installer with `git` available or set `core.hooksPath` manually. From 7a394b7baa7dce578c30feb9afb0ad28ca53ac1f Mon Sep 17 00:00:00 2001 From: Shiven Garia Date: Mon, 29 Jun 2026 23:02:03 +0530 Subject: [PATCH 4/5] reverted to jsonwebtoken = { version = "10.4.0", features = ["rust_crypto"] } at line 236 Signed-off-by: Shiven Garia --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 96a4171c7ac..a25ec68ece1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -233,7 +233,7 @@ is-terminal = "0.4" itertools = "0.12" itoa = "1" json5 = "0.4" -jsonwebtoken = "10.4.0" +jsonwebtoken = { version = "10.4.0", features = ["rust_crypto"] } junction = "1" jwks = "0.5.3" lazy_static = "1.4.0" From b3b8a4938a9dca21d4ce04e3c035761aab0a503e Mon Sep 17 00:00:00 2001 From: Shiven Garia Date: Mon, 29 Jun 2026 23:03:47 +0530 Subject: [PATCH 5/5] Delete .github/ISSUES/0001-git-hooks-installer-bug.md Signed-off-by: Shiven Garia --- .../ISSUES/0001-git-hooks-installer-bug.md | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/ISSUES/0001-git-hooks-installer-bug.md diff --git a/.github/ISSUES/0001-git-hooks-installer-bug.md b/.github/ISSUES/0001-git-hooks-installer-bug.md deleted file mode 100644 index ecd04b6a561..00000000000 --- a/.github/ISSUES/0001-git-hooks-installer-bug.md +++ /dev/null @@ -1,45 +0,0 @@ -Title: Hook installer removes .git/hooks and uses symlink — breaks on Windows; prefer git core.hooksPath - -Summary -------- -`git-hooks/install-hooks.sh` unconditionally removes `../.git/hooks` and attempts to create a symlink to `../git-hooks/hooks`. On Windows (and some restricted environments) creating symlinks requires elevated privileges or is unsupported, and the script can unintentionally remove existing hooks. This causes the installer to fail or damage developer setups. - -Steps to reproduce ------------------- -1. On a Windows machine without symlink privileges, run from repo root: - -```bash -bash git-hooks/install-hooks.sh -``` - -2. Observe that `ln -s` fails (or that `.git/hooks` was removed), and that hooks are not installed. - -Expected behavior ------------------ -- Installer should set up hooks in a cross-platform way without requiring symlink privileges and without deleting existing hooks unless explicitly requested. - -Proposed fix ------------- -- Use `git config core.hooksPath git-hooks/hooks` by default (works cross-platform and avoids symlinks). -- Only attempt a symlink as a fallback when `git` is not available, and show a clear warning. -- Only run `rustup component add rustfmt` if `rustup` is installed. - -Acceptance criteria -------------------- -- Running `bash git-hooks/install-hooks.sh` configures hooks for normal Git clients on Linux/macOS/Windows without requiring symlink privileges. -- Existing `.git/hooks` is not accidentally deleted without fallback/config instructions. -- The repository documentation includes a short note about installing hooks (optional follow-up). - -Suggested labels ----------------- -- bug -- platform-windows -- good first issue - -Suggested assignee ------------------- -- Leave unassigned or assign to core-maintainers - -Patch / PR ----------- -I have a proposed patch that updates `git-hooks/install-hooks.sh` to prefer `git config core.hooksPath` and to guard `rustup` usage. The patch is ready in a branch `fix/git-hooks-installer`.