feat(public-share): harden read-only links β expiry, password, hard-revoke, rate-limit#258
Merged
Merged
Conversation
β¦evoke, rate-limit S6-02 hardening, all backward-compatible (legacy 16-byte/no-expiry/no-password shares keep working). Backend: 32-byte tokens (legacy 32-hex still resolve); optional expiresAt (resolveShare 404s expired); optional bcrypt password gate on the public page (POST /share/:token unlock); hard revoke via DELETE /api/v2/public-shares/:id (removes the share + the global token-index row); express-rate-limit on /share/:token (60/min) and intake (10/min); passwordHash never returned (responses expose hasPassword). Frontend: PublicShareModal exposes expiry + password on create, a lock/expiry status row, and a Delete-link button; + i18n keys. Verified: 209 backend tests pass (added a legacy-token backward-compat test); SFC + en.js compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jun 19, 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.
S6-02 β Public read-only share links: security hardening
Hardens the existing public-sharing feature to a real-world, secure baseline. All backward-compatible β legacy shares (16-byte tokens, no expiry/password) keep working.
Backend (
Modules/PublicShares/)expiresAt;resolveSharereturns 404 for expired links./share/:tokenunlock) and validates before showing the board. The hash is never returned (responses expose onlyhasPassword).DELETE /api/v2/public-shares/:idremoves the share doc and its GLOBAL token-index row β link dies immediately + permanently (vs the old softenabled:false).express-rate-limiton/share/:token(60/min) and the intake POST (10/min).Frontend
PublicShareModalnow offers expiry + password on create, shows a π/expiry status row, and a Delete link (hard-revoke) button. + i18n keys.Notes / scope
noindexwere already present and retained.Verified
en.jscompile.π€ Generated with Claude Code