Compare commits
	
		
			64 Commits
		
	
	
		
			c05718b2d7
			...
			20251028
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a128e4a597 | |||
| 96f3773375 | |||
| 5db16c2355 | |||
| e93e3f4d9c | |||
| 5abe3bfbd5 | |||
| 4deb1a5536 | |||
| 83efd5ac56 | |||
| 89f806a692 | |||
| 58a19c04e7 | |||
| 7d8931c365 | |||
| 05adc38408 | |||
| 97ff967b87 | |||
| c3215e0053 | |||
| fe968d6765 | |||
| 38bd624ef6 | |||
| e32b2be2b8 | |||
| 29f1c4d1f3 | |||
| 27562c4fbf | |||
| d329a8cf36 | |||
| d4253d897d | |||
| b2c91467e5 | |||
| 922cc4e45f | |||
| e0ec825947 | |||
| e82efde2b9 | |||
| 890e1ef1f1 | |||
| 2503500800 | |||
| 988c15e32e | |||
| 5bb6bdccd0 | |||
| 068284c456 | |||
| a9a9c26a3e | |||
| 34ce0fd1ae | |||
| 8ce29bbb63 | |||
| 52bdb70a8a | |||
| 23c53a8548 | |||
| 28efebdff1 | |||
| d44daf0c04 | |||
| 1cdf10d548 | |||
| 0dcb86c538 | |||
| 4fd42d0e17 | |||
| 9afeb3c67e | |||
| 7213096faf | |||
| 5d321e4cac | |||
| 77f7ba94ba | |||
| 830170303a | |||
| e6ad5b0090 | |||
| 7f42b9ca4f | |||
| 2e195cba32 | |||
| f972a0c1fc | |||
| 90991c89be | |||
| 505d76f804 | |||
| 76920f66d7 | |||
| d86d53ad64 | |||
| f63e0dd97b | |||
| e707b41e5e | |||
| 4f432402fb | |||
| ab0310347c | |||
| 06d46408b5 | |||
| ba55b66ed1 | |||
| 0eaca53a16 | |||
| e8e4aab0eb | |||
| 7abbb78dda | |||
| e26faee426 | |||
| a7a761f32a | |||
| 0e83f64f24 | 
							
								
								
									
										49
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										49
									
								
								.drone.yml
									
									
									
									
									
								
							| @@ -4,10 +4,57 @@ type: docker | ||||
| name: default | ||||
|  | ||||
| steps: | ||||
| - name: cargo_check | ||||
| # Code quality | ||||
| - name: code_quality | ||||
|   image: rust | ||||
|   volumes: | ||||
|     - name: rust_registry | ||||
|       path: /usr/local/cargo/registry | ||||
|   commands: | ||||
|   - rustup component add clippy | ||||
|   - cargo clippy -- -D warnings | ||||
|   - cargo test | ||||
|  | ||||
| # Build source code | ||||
| - name: compile | ||||
|   image: rust | ||||
|   depends_on: | ||||
|     - code_quality | ||||
|   when: | ||||
|     event: | ||||
|       - tag | ||||
|   volumes: | ||||
|     - name: rust_registry | ||||
|       path: /usr/local/cargo/registry | ||||
|     - name: releases | ||||
|       path: /tmp/releases | ||||
|   commands: | ||||
|     - cargo build --release | ||||
|     - ls -lah target/release/basic-oidc | ||||
|     - cp target/release/basic-oidc /tmp/releases | ||||
|  | ||||
| # Auto-release to Gitea | ||||
| - name: gitea_release | ||||
|   image: plugins/gitea-release | ||||
|   depends_on: | ||||
|     - compile | ||||
|   when: | ||||
|     event: | ||||
|       - tag | ||||
|   volumes: | ||||
|     - name: releases | ||||
|       path: /tmp/releases | ||||
|   environment: | ||||
|     PLUGIN_API_KEY: | ||||
|       from_secret: GITEA_API_KEY # needs permission write:repository | ||||
|   settings: | ||||
|     base_url: https://gitea.communiquons.org | ||||
|     files: | ||||
|       - /tmp/releases/basic-oidc | ||||
|     checksum: sha512 | ||||
|  | ||||
| volumes: | ||||
|   - name: rust_registry | ||||
|     temp: { } | ||||
|   - name: releases | ||||
|     temp: {} | ||||
							
								
								
									
										182
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										182
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @@ -59,7 +59,7 @@ dependencies = [ | ||||
|  "brotli", | ||||
|  "bytes", | ||||
|  "bytestring", | ||||
|  "derive_more 2.0.1", | ||||
|  "derive_more", | ||||
|  "encoding_rs", | ||||
|  "flate2", | ||||
|  "foldhash", | ||||
| @@ -74,7 +74,7 @@ dependencies = [ | ||||
|  "mime", | ||||
|  "percent-encoding", | ||||
|  "pin-project-lite", | ||||
|  "rand 0.9.1", | ||||
|  "rand 0.9.2", | ||||
|  "sha1", | ||||
|  "smallvec", | ||||
|  "tokio", | ||||
| @@ -85,15 +85,15 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "actix-identity" | ||||
| version = "0.8.0" | ||||
| version = "0.9.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "23b8ddc6f6a8b19c4016aaa13519968da9969bc3bc1c1c883cdb0f25dd6c8cf7" | ||||
| checksum = "810f47733f956175bd5b2ae17ae5237fa92bd1b6a4a65f646a7240dbe9ff2728" | ||||
| dependencies = [ | ||||
|  "actix-service", | ||||
|  "actix-session", | ||||
|  "actix-utils", | ||||
|  "actix-web", | ||||
|  "derive_more 1.0.0", | ||||
|  "derive_more", | ||||
|  "futures-core", | ||||
|  "serde", | ||||
|  "tracing", | ||||
| @@ -174,16 +174,16 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "actix-session" | ||||
| version = "0.10.1" | ||||
| version = "0.11.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "efe6976a74f34f1b6d07a6c05aadc0ed0359304a7781c367fa5b4029418db08f" | ||||
| checksum = "400c27fd4cdbe0082b7bbd29ac44a3070cbda1b2114138dc106ba39fe2f90dff" | ||||
| dependencies = [ | ||||
|  "actix-service", | ||||
|  "actix-utils", | ||||
|  "actix-web", | ||||
|  "anyhow", | ||||
|  "derive_more 1.0.0", | ||||
|  "rand 0.8.5", | ||||
|  "derive_more", | ||||
|  "rand 0.9.2", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "tracing", | ||||
| @@ -218,7 +218,7 @@ dependencies = [ | ||||
|  "bytestring", | ||||
|  "cfg-if", | ||||
|  "cookie", | ||||
|  "derive_more 2.0.1", | ||||
|  "derive_more", | ||||
|  "encoding_rs", | ||||
|  "foldhash", | ||||
|  "futures-core", | ||||
| @@ -339,12 +339,6 @@ dependencies = [ | ||||
|  "alloc-no-stdlib", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "android-tzdata" | ||||
| version = "0.1.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" | ||||
|  | ||||
| [[package]] | ||||
| name = "android_system_properties" | ||||
| version = "0.1.5" | ||||
| @@ -574,9 +568,9 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" | ||||
|  | ||||
| [[package]] | ||||
| name = "base64urlsafedata" | ||||
| version = "0.5.2" | ||||
| version = "0.5.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e5913e643e4dfb43d5908e9e6f1386f8e0dfde086ecef124a6450c6195d89160" | ||||
| checksum = "215ee31f8a88f588c349ce2d20108b2ed96089b96b9c2b03775dc35dd72938e8" | ||||
| dependencies = [ | ||||
|  "base64 0.21.7", | ||||
|  "pastey", | ||||
| @@ -601,7 +595,6 @@ dependencies = [ | ||||
|  "clap", | ||||
|  "digest", | ||||
|  "env_logger", | ||||
|  "futures-util", | ||||
|  "include_dir", | ||||
|  "jwt-simple", | ||||
|  "lazy-regex", | ||||
| @@ -611,7 +604,7 @@ dependencies = [ | ||||
|  "mailchecker", | ||||
|  "mime_guess", | ||||
|  "qrcode-generator", | ||||
|  "rand 0.9.1", | ||||
|  "rand 0.9.2", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
|  "serde_yaml", | ||||
| @@ -634,9 +627,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "bcrypt" | ||||
| version = "0.17.0" | ||||
| version = "0.17.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "92758ad6077e4c76a6cadbce5005f666df70d4f13b19976b1a8062eef880040f" | ||||
| checksum = "abaf6da45c74385272ddf00e1ac074c7d8a6c1a1dda376902bd6a427522a8b2c" | ||||
| dependencies = [ | ||||
|  "base64 0.22.1", | ||||
|  "blowfish", | ||||
| @@ -792,16 +785,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" | ||||
|  | ||||
| [[package]] | ||||
| name = "chrono" | ||||
| version = "0.4.41" | ||||
| version = "0.4.42" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" | ||||
| checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" | ||||
| dependencies = [ | ||||
|  "android-tzdata", | ||||
|  "iana-time-zone", | ||||
|  "js-sys", | ||||
|  "num-traits", | ||||
|  "wasm-bindgen", | ||||
|  "windows-link", | ||||
|  "windows-link 0.2.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -816,9 +808,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "clap" | ||||
| version = "4.5.40" | ||||
| version = "4.5.50" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" | ||||
| checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" | ||||
| dependencies = [ | ||||
|  "clap_builder", | ||||
|  "clap_derive", | ||||
| @@ -826,9 +818,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "clap_builder" | ||||
| version = "4.5.40" | ||||
| version = "4.5.50" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" | ||||
| checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" | ||||
| dependencies = [ | ||||
|  "anstream", | ||||
|  "anstyle", | ||||
| @@ -838,9 +830,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "clap_derive" | ||||
| version = "4.5.40" | ||||
| version = "4.5.49" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" | ||||
| checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" | ||||
| dependencies = [ | ||||
|  "heck", | ||||
|  "proc-macro2", | ||||
| @@ -950,6 +942,12 @@ version = "0.8.21" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" | ||||
|  | ||||
| [[package]] | ||||
| name = "crunchy" | ||||
| version = "0.2.4" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" | ||||
|  | ||||
| [[package]] | ||||
| name = "crypto-bigint" | ||||
| version = "0.5.5" | ||||
| @@ -1028,34 +1026,13 @@ dependencies = [ | ||||
|  "powerfmt", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "derive_more" | ||||
| version = "1.0.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" | ||||
| dependencies = [ | ||||
|  "derive_more-impl 1.0.0", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "derive_more" | ||||
| version = "2.0.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" | ||||
| dependencies = [ | ||||
|  "derive_more-impl 2.0.1", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "derive_more-impl" | ||||
| version = "1.0.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn", | ||||
|  "unicode-xid", | ||||
|  "derive_more-impl", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -1259,9 +1236,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" | ||||
|  | ||||
| [[package]] | ||||
| name = "form_urlencoded" | ||||
| version = "1.2.1" | ||||
| version = "1.2.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" | ||||
| checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" | ||||
| dependencies = [ | ||||
|  "percent-encoding", | ||||
| ] | ||||
| @@ -1421,9 +1398,13 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "half" | ||||
| version = "1.8.3" | ||||
| version = "2.6.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" | ||||
| checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" | ||||
| dependencies = [ | ||||
|  "cfg-if", | ||||
|  "crunchy", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "hashbrown" | ||||
| @@ -1767,9 +1748,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "idna" | ||||
| version = "1.0.3" | ||||
| version = "1.1.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" | ||||
| checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" | ||||
| dependencies = [ | ||||
|  "idna_adapter", | ||||
|  "smallvec", | ||||
| @@ -2003,7 +1984,7 @@ dependencies = [ | ||||
|  "base64 0.22.1", | ||||
|  "bincode", | ||||
|  "log", | ||||
|  "rand 0.9.1", | ||||
|  "rand 0.9.2", | ||||
|  "reqwest", | ||||
|  "serde", | ||||
|  "serde_json", | ||||
| @@ -2051,15 +2032,15 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "log" | ||||
| version = "0.4.27" | ||||
| version = "0.4.28" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" | ||||
| checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" | ||||
|  | ||||
| [[package]] | ||||
| name = "mailchecker" | ||||
| version = "6.0.17" | ||||
| version = "6.0.19" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "db3c69370540384985601e4adbbbc3046a658853e4909a4bd744bb390f6f9759" | ||||
| checksum = "abad4bc63045f04cfc55aa4c55d4ec0a890c377ce56463bfc2adc2bc059c4b84" | ||||
| dependencies = [ | ||||
|  "fast_chemail", | ||||
|  "once_cell", | ||||
| @@ -2343,9 +2324,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "percent-encoding" | ||||
| version = "2.3.1" | ||||
| version = "2.3.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" | ||||
| checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" | ||||
|  | ||||
| [[package]] | ||||
| name = "pin-project-lite" | ||||
| @@ -2504,9 +2485,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "rand" | ||||
| version = "0.9.1" | ||||
| version = "0.9.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" | ||||
| checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" | ||||
| dependencies = [ | ||||
|  "rand_chacha 0.9.0", | ||||
|  "rand_core 0.9.3", | ||||
| @@ -2822,28 +2803,38 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "serde" | ||||
| version = "1.0.219" | ||||
| version = "1.0.228" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" | ||||
| checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" | ||||
| dependencies = [ | ||||
|  "serde_core", | ||||
|  "serde_derive", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_cbor_2" | ||||
| version = "0.12.0-dev" | ||||
| version = "0.13.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "b46d75f449e01f1eddbe9b00f432d616fbbd899b809c837d0fbc380496a0dd55" | ||||
| checksum = "34aec2709de9078e077090abd848e967abab63c9fb3fdb5d4799ad359d8d482c" | ||||
| dependencies = [ | ||||
|  "half", | ||||
|  "serde", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_derive" | ||||
| version = "1.0.219" | ||||
| name = "serde_core" | ||||
| version = "1.0.228" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" | ||||
| checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" | ||||
| dependencies = [ | ||||
|  "serde_derive", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_derive" | ||||
| version = "1.0.228" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
| @@ -2852,14 +2843,15 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_json" | ||||
| version = "1.0.140" | ||||
| version = "1.0.145" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" | ||||
| checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" | ||||
| dependencies = [ | ||||
|  "itoa", | ||||
|  "memchr", | ||||
|  "ryu", | ||||
|  "serde", | ||||
|  "serde_core", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -3338,9 +3330,9 @@ checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" | ||||
|  | ||||
| [[package]] | ||||
| name = "url" | ||||
| version = "2.5.4" | ||||
| version = "2.5.7" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" | ||||
| checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" | ||||
| dependencies = [ | ||||
|  "form_urlencoded", | ||||
|  "idna", | ||||
| @@ -3380,9 +3372,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" | ||||
|  | ||||
| [[package]] | ||||
| name = "uuid" | ||||
| version = "1.17.0" | ||||
| version = "1.18.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" | ||||
| checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" | ||||
| dependencies = [ | ||||
|  "getrandom 0.3.2", | ||||
|  "js-sys", | ||||
| @@ -3524,9 +3516,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "webauthn-attestation-ca" | ||||
| version = "0.5.2" | ||||
| version = "0.5.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "384e43534efe4e8f56c4eb1615a27e24d2ff29281385c843cf9f16ac1077dbdc" | ||||
| checksum = "f77a2892ec44032e6c48dad9aad1b05fada09c346ada11d8d32db119b4b4f205" | ||||
| dependencies = [ | ||||
|  "base64urlsafedata", | ||||
|  "openssl", | ||||
| @@ -3538,9 +3530,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "webauthn-rs" | ||||
| version = "0.5.2" | ||||
| version = "0.5.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ed1f861a94557baeb0cf711e3e55d623c46b68f4aab7aa932562f785b8b5f1ab" | ||||
| checksum = "eb7c3a2f9c8bddd524e47bbd427bcf3a28aa074de55d74470b42a91a41937b8e" | ||||
| dependencies = [ | ||||
|  "base64urlsafedata", | ||||
|  "serde", | ||||
| @@ -3552,9 +3544,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "webauthn-rs-core" | ||||
| version = "0.5.2" | ||||
| version = "0.5.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "269c210cd5f183aaca860bb5733187d1dd110ebed54640f8fc1aca31a04aa4dc" | ||||
| checksum = "19f1d80f3146382529fe70a3ab5d0feb2413a015204ed7843f9377cd39357fc4" | ||||
| dependencies = [ | ||||
|  "base64 0.21.7", | ||||
|  "base64urlsafedata", | ||||
| @@ -3579,9 +3571,9 @@ dependencies = [ | ||||
|  | ||||
| [[package]] | ||||
| name = "webauthn-rs-proto" | ||||
| version = "0.5.2" | ||||
| version = "0.5.3" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "144dbee9abb4bfad78fd283a2613f0312a0ed5955051b7864cfc98679112ae60" | ||||
| checksum = "9e786894f89facb9aaf1c5f6559670236723c98382e045521c76f3d5ca5047bd" | ||||
| dependencies = [ | ||||
|  "base64 0.21.7", | ||||
|  "base64urlsafedata", | ||||
| @@ -3605,6 +3597,12 @@ version = "0.1.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows-link" | ||||
| version = "0.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" | ||||
|  | ||||
| [[package]] | ||||
| name = "windows-registry" | ||||
| version = "0.4.0" | ||||
| @@ -3622,7 +3620,7 @@ version = "0.3.2" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" | ||||
| dependencies = [ | ||||
|  "windows-link", | ||||
|  "windows-link 0.1.1", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| @@ -3631,7 +3629,7 @@ version = "0.3.1" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" | ||||
| dependencies = [ | ||||
|  "windows-link", | ||||
|  "windows-link 0.1.1", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
|   | ||||
							
								
								
									
										27
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								Cargo.toml
									
									
									
									
									
								
							| @@ -7,24 +7,23 @@ edition = "2024" | ||||
|  | ||||
| [dependencies] | ||||
| actix = "0.13.5" | ||||
| actix-identity = "0.8.0" | ||||
| actix-identity = "0.9.0" | ||||
| actix-web = "4.11.0" | ||||
| actix-session = { version = "0.10.1", features = ["cookie-session"] } | ||||
| actix-session = { version = "0.11.0", features = ["cookie-session"] } | ||||
| actix-remote-ip = "0.1.0" | ||||
| clap = { version = "4.5.40", features = ["derive", "env"] } | ||||
| clap = { version = "4.5.50", features = ["derive", "env"] } | ||||
| include_dir = "0.7.4" | ||||
| log = "0.4.27" | ||||
| serde_json = "1.0.140" | ||||
| log = "0.4.28" | ||||
| serde_json = "1.0.145" | ||||
| serde_yaml = "0.9.34" | ||||
| env_logger = "0.11.8" | ||||
| serde = { version = "1.0.219", features = ["derive"] } | ||||
| bcrypt = "0.17.0" | ||||
| uuid = { version = "1.17.0", features = ["v4"] } | ||||
| serde = { version = "1.0.228", features = ["derive"] } | ||||
| bcrypt = "0.17.1" | ||||
| uuid = { version = "1.18.1", features = ["v4"] } | ||||
| mime_guess = "2.0.5" | ||||
| askama = "0.14.0" | ||||
| futures-util = "0.3.31" | ||||
| urlencoding = "2.1.3" | ||||
| rand = "0.9.1" | ||||
| rand = "0.9.2" | ||||
| base64 = "0.22.1" | ||||
| jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] } | ||||
| digest = "0.10.7" | ||||
| @@ -33,10 +32,10 @@ lazy-regex = "3.4.1" | ||||
| totp_rfc6238 = "0.6.1" | ||||
| base32 = "0.5.1" | ||||
| qrcode-generator = "5.0.0" | ||||
| webauthn-rs = { version = "0.5.2", features = ["danger-allow-state-serialisation"] } | ||||
| url = "2.5.4" | ||||
| webauthn-rs = { version = "0.5.3", features = ["danger-allow-state-serialisation"] } | ||||
| url = "2.5.7" | ||||
| light-openid = { version = "1.0.4", features = ["crypto-wrapper"] } | ||||
| bincode = "2.0.1" | ||||
| chrono = "0.4.41" | ||||
| chrono = "0.4.42" | ||||
| lazy_static = "1.5.0" | ||||
| mailchecker = "6.0.17" | ||||
| mailchecker = "6.0.19" | ||||
|   | ||||
| @@ -18,6 +18,14 @@ pub struct AppConfig { | ||||
|     #[clap(short, long, env)] | ||||
|     pub storage_path: String, | ||||
|  | ||||
|     /// Overwrite clients list file path, if the file is not to be found in storage path | ||||
|     #[clap(long, env)] | ||||
|     pub clients_list_file_path: Option<String>, | ||||
|  | ||||
|     /// Overwrite providers list file path, if the file is not to be found in storage path | ||||
|     #[clap(long, env)] | ||||
|     pub providers_list_file_path: Option<String>, | ||||
|  | ||||
|     /// App token token | ||||
|     #[clap(short, long, env, default_value = "")] | ||||
|     pub token_key: String, | ||||
| @@ -32,7 +40,7 @@ pub struct AppConfig { | ||||
|  | ||||
|     /// IP location service API | ||||
|     /// | ||||
|     /// Up instance of IP location service : https://gitlab.com/pierre42100/iplocationserver | ||||
|     /// Operating instance of IP location service : https://gitlab.com/pierre42100/iplocationserver | ||||
|     /// | ||||
|     /// Example: "https://api.geoip.rs" | ||||
|     #[arg(long, short, env)] | ||||
| @@ -71,11 +79,17 @@ impl AppConfig { | ||||
|     } | ||||
|  | ||||
|     pub fn clients_file(&self) -> PathBuf { | ||||
|         self.storage_path().join(CLIENTS_LIST_FILE) | ||||
|         match &self.clients_list_file_path { | ||||
|             None => self.storage_path().join(CLIENTS_LIST_FILE), | ||||
|             Some(p) => Path::new(p).to_path_buf(), | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub fn providers_file(&self) -> PathBuf { | ||||
|         self.storage_path().join(PROVIDERS_LIST_FILE) | ||||
|         match &self.providers_list_file_path { | ||||
|             None => self.storage_path().join(PROVIDERS_LIST_FILE), | ||||
|             Some(p) => Path::new(p).to_path_buf(), | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub fn full_url(&self, uri: &str) -> String { | ||||
|   | ||||
| @@ -125,7 +125,7 @@ impl Client { | ||||
|  | ||||
| pub type ClientManager = EntityManager<Client>; | ||||
|  | ||||
| impl EntityManager<Client> { | ||||
| impl ClientManager { | ||||
|     pub fn find_by_id(&self, u: &ClientID) -> Option<Client> { | ||||
|         for entry in self.iter() { | ||||
|             if entry.id.eq(u) { | ||||
|   | ||||
| @@ -3,7 +3,7 @@ use std::sync::Arc; | ||||
|  | ||||
| use actix::Actor; | ||||
| use actix_identity::IdentityMiddleware; | ||||
| use actix_identity::config::LogoutBehaviour; | ||||
| use actix_identity::config::LogoutBehavior; | ||||
| use actix_remote_ip::RemoteIPConfig; | ||||
| use actix_session::SessionMiddleware; | ||||
| use actix_session::storage::CookieSessionStore; | ||||
| @@ -100,7 +100,7 @@ async fn main() -> std::io::Result<()> { | ||||
|         .build(); | ||||
|  | ||||
|         let identity_middleware = IdentityMiddleware::builder() | ||||
|             .logout_behaviour(LogoutBehaviour::PurgeSession) | ||||
|             .logout_behavior(LogoutBehavior::PurgeSession) | ||||
|             .visit_deadline(Some(Duration::from_secs(MAX_INACTIVITY_DURATION))) | ||||
|             .login_deadline(Some(Duration::from_secs(MAX_SESSION_DURATION))) | ||||
|             .build(); | ||||
|   | ||||
| @@ -89,22 +89,21 @@ where | ||||
|         Box::pin(async move { | ||||
|             // Check if POST request comes from another website (block invalid origins) | ||||
|             let origin = req.headers().get(header::ORIGIN); | ||||
|             if req.method() == Method::POST && req.path() != TOKEN_URI && req.path() != USERINFO_URI | ||||
|             if req.method() == Method::POST | ||||
|                 && req.path() != TOKEN_URI | ||||
|                 && req.path() != USERINFO_URI | ||||
|                 && let Some(o) = origin | ||||
|                 && !o | ||||
|                     .to_str() | ||||
|                     .unwrap_or("bad") | ||||
|                     .eq(&AppConfig::get().website_origin) | ||||
|             { | ||||
|                 if let Some(o) = origin { | ||||
|                     if !o | ||||
|                         .to_str() | ||||
|                         .unwrap_or("bad") | ||||
|                         .eq(&AppConfig::get().website_origin) | ||||
|                     { | ||||
|                         log::warn!("Blocked POST request from invalid origin! Origin given {o:?}"); | ||||
|                         return Ok(req.into_response( | ||||
|                             HttpResponse::Unauthorized() | ||||
|                                 .body("POST request from invalid origin!") | ||||
|                                 .map_into_right_body(), | ||||
|                         )); | ||||
|                     } | ||||
|                 } | ||||
|                 log::warn!("Blocked POST request from invalid origin! Origin given {o:?}"); | ||||
|                 return Ok(req.into_response( | ||||
|                     HttpResponse::Unauthorized() | ||||
|                         .body("POST request from invalid origin!") | ||||
|                         .map_into_right_body(), | ||||
|                 )); | ||||
|             } | ||||
|  | ||||
|             if req.path().starts_with("/.git") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user