Repository navigation
chore(deps): land all open Dependabot updates + test keyless API access - #90
Merged
Merged
Conversation
Cargo: actix-files 0.7.0, actix-web 4.15.0, actix-multipart 0.8.5, actix-web-httpauth 0.8.3, askama 0.16.1, bytesize 2.7.0, clap 4.6.7, futures 0.3.34, html-escape 0.2.15, lazy_static 1.5.1, log 0.4.34, qrcode-generator 6.1.2, rand 0.10.3, rusqlite 0.40.2, rust-embed 8.13.0, serde 1.0.229, serde_json 1.0.151+. Actions: docker/setup-qemu-action v4, setup-buildx-action v4, login-action v4, metadata-action v6, build-push-action v7. qrcode-generator 6 replaces to_svg_to_string with an Encoder/Renderer pair; default features are disabled to avoid pulling in the image crate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds an actix integration test that creates, reads, lists, updates and deletes a paste with no Authorization header when no API key and no Basic Auth are configured, and a test that a configured key still returns 401 API_KEY_REQUIRED. Under cfg(test) ARGS is parsed from a fixed argv with a temp data dir instead of the harness's CLI flags. The API key check now returns a boxed error: actix-web 4.15 grew HttpResponse past clippy's result_large_err threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CTO review (MIK-85/MIK-86): LGTM. CI green (Check & Test, CodeQL). Reviewed the non-lockfile diff; keyless + key-enforced tests cover the API change. Extra check: release build on loopback with --qr, GET /qr/{id} → 200 with a 256x256 SVG, so the qrcode-generator 6.x migration renders. Known pre-existing issue (Basic Auth + API key both on the Authorization header) tracked separately. |
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates every open Dependabot PR into one change, and adds tests proving the REST API works without an API key.
Dependency bumps (all 22 open Dependabot PRs, none skipped)
cargo update -palso brought in transitive updates (e.g. actix-http 3.18.12, actix-server 2.9.4); the lockfile diff has the full list.Supersedes #59 #60 #61 #62 #63 #65 #68 #69 #70 #73 #74 #77 #78 #79 #80 #81 #84 #85 #86 #87 #88 #89. Close them once this PR is merged.
Code changes
to_svg_to_stringis gone;string_to_qr_svgnow usesqr::Encoder+Renderer::to_svg_string(same error-correction level and size,src/util/misc.rs). Default features are off (features = ["qr"]) so the newimage/pngdeps aren't pulled in.HttpResponseis now big enough to trip clippy'sresult_large_erronrequire_api_key, so the error is boxed (src/endpoints/api.rs).Keyless API access
require_api_keynow delegates tocheck_api_key(configured, req)so a key can be injected in tests.api_works_without_api_key_or_basic_auth: actixtest::init_serviceintegration test. With no key and no Basic Auth it runs POST/api/v1/paste, GET/api/v1/paste/{id}, GET/api/v1/pastes, PATCH and DELETE with noAuthorizationheader, and all of them succeed.configured_api_key_is_enforced: with a key configured, a request with no header gets 401API_KEY_REQUIRED, a wrong bearer token is rejected, and the right one is accepted.cfg(test),ARGSis parsed from a fixed argv (--editable, temp--data-dir) instead of the test harness's own CLI flags.curlexample and says the key is optional.Verification (local, rustc 1.99)
cargo fmt --check,cargo clippy -- -D warnings(also--all-targets),cargo test: 5 passedcargo build --release: OKBITVAULT_API_KEY,curl -X POST /api/v1/pastewith no auth header →HTTP/1.1 201 CreatedKnown issue (not fixed here, out of scope)
If both Basic Auth and
BITVAULT_API_KEYare configured, the API can't be used. Both read the singleAuthorizationheader (Basic vs Bearer), so no request can satisfy both. The README line saying clients should "send Basic Auth credentials alongside the Bearer token" describes something that can't be done.🤖 Generated with Claude Code