Skip to content

V1.2.2#100

Merged
csd113 merged 17 commits into
mainfrom
v1.2.2
May 28, 2026
Merged

V1.2.2#100
csd113 merged 17 commits into
mainfrom
v1.2.2

Conversation

@csd113
Copy link
Copy Markdown
Owner

@csd113 csd113 commented May 28, 2026

No description provided.

csd113 added 17 commits May 21, 2026 16:41
Add a server-rendered submit button to the public user preferences form so Firefox/Tor-style no-JS sessions can persist theme and activity badge preferences without client-side JavaScript.

Validation:
- npx playwright test --project=firefox-nojs tests/e2e/firefox-nojs-public.spec.ts
- npx playwright test --project=chromium tests/e2e/posting-thread.spec.ts tests/e2e/password-boards.spec.ts tests/e2e/media.spec.ts
- cargo fmt --all --check
- cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::cargo
- cargo test --workspace --all-features
Compact inline report, self-action, and admin post controls so they align with post metadata rows across desktop and mobile.

Bump RustChan metadata and docs to 1.2.2.
Add server-generated CAPTCHA images, validate submitted answers once per challenge, and wire the new fields through post submission. Update posting forms, route handling, admin/setup text, and frontend validation to remove the browser PoW solver.
Use an Arc<TorClient<_>> to hold the bootstrapped Tor client so the final handle can be shared and kept alive; update the keep-alive comment to state that dropping the final Tor client handle closes Tor circuits and kills the onion service. Also add an explicit Arc type annotation and adjust expression grouping for clarity.
…porting, adding server-rendered CSRF-protected controls when JavaScript is unavailable while preserving the existing JavaScript menu/modal experience.
Make CSRF and board-access cookies respect the actual transport of each request. Add OptionalConnectInfoPeer extractor (FromRequestParts) to surface ConnectInfo, introduce ensure_csrf_with_secure and ensure_csrf_for_request helpers that choose the Secure cookie flag using should_set_public_secure_cookie(headers, peer). Update many handlers to accept request headers and the optional peer and call ensure_csrf_for_request. Refactor board unlock flow to build the access cookie with the per-request secure flag and add tests asserting the Secure attribute follows the request. Also refactor thread edit error rendering to accept and forward the CSRF cookie secure setting.
Introduce RequestTransport and SecureCookieContext to carry peer and direct_https info from requests, add middleware to set RequestTransport in the router, and propagate SecureCookieContext through handlers instead of raw SocketAddr. Refactor should_set_secure_cookie to accept the context (and add should_set_secure_cookie_with_config), update admin CSRF cookie helpers to take a secure flag, and apply these changes across admin, board, thread handlers and cookies logic. Update tests to reflect the new transport/context behavior.
Improve multipart upload handling by distinguishing between an explicitly submitted filename and an empty/unselected file control. If a file part has a non-empty submitted filename but zero bytes, return BadRequest; if the file control is empty/unselected, ignore it and treat it as absent. Added tests covering named zero-byte uploads and empty unselected file controls. Also update upload finalize payload to omit primary_thumb_path when the thumb path is an empty string and add a test for that behavior.
Drop CHECKSUMS_FILE_NAME from the list checked in write_root_checksums so the routine no longer requires that file to be present. In the admin backups template, generate manual_part_options via split_zip_part_size_options(4), replace the hard-coded <option> elements with the generated {manual_part_options}, and pass the new variable into the format! call. This consolidates part-size option rendering and avoids duplicated hard-coded markup.
Make runtime setup more robust and tighten config/duplication behavior:

- Ensure all expected runtime directories are created during migration.
- Stop falling back to defaults on settings.toml parse errors; print a concise error and exit (exit code 78) to avoid leaking parse details or secrets.
- Prevent reuse of dedup cache entries from other boards by requiring cached file/thumb paths to belong to the same board. Add helper functions for path checks and a unit test covering cross-board dedup avoidance.
Add ARIA labels to various form fields and textareas (thread, reply, edit, captcha, poll options, uploads, board password, search, report reason) and update tests to expect them. Improve modal keyboard behavior by tracking the active trigger when opening report/edit modals and restoring focus on close; ensure ESC closes the report modal. Update CSS to improve responsive word-wrapping, form focus styles, board-access password styling, and some layout/size tweaks; add theme-specific error banner colors. These changes enhance accessibility, keyboard navigation, and responsive layout.
@csd113 csd113 merged commit a558c31 into main May 28, 2026
5 checks passed
@csd113 csd113 deleted the v1.2.2 branch May 28, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant