Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

feat(share): add share ID length setting#677

Merged
stonith404 merged 1 commit into
stonith404:mainfrom
romainricard:feat-share-add-shareid-length
Nov 24, 2024
Merged

feat(share): add share ID length setting#677
stonith404 merged 1 commit into
stonith404:mainfrom
romainricard:feat-share-add-shareid-length

Conversation

@romainricard
Copy link
Copy Markdown
Contributor

@romainricard romainricard commented Nov 20, 2024

Goal

I'd like to be able to use a more robust share ID / share link when I share confidential files, regardless of password protection.

What this PR does

  • Add share ID length to share > settings
  • Use cryptographically secure RNG for IDs: I'm not a TS/JS expert, so I used a snippet provided by Sentry that should be relatively safe. crypto.getRandomValues is well-supported, and does not require a secure context (i.e. https), so it does not break when running locally/on a LAN without https.
  • Use secure default value for IDs length: this topic is debated, but it is globally accepted that a 7 chars token is no longer safe against bruteforce. I used 16 8 to be safe.
  • Add FR and EN translation

Let me know if I need to change anything! ✨

Closes #613

Comment thread backend/prisma/seed/config.seed.ts Outdated
@romainricard romainricard force-pushed the feat-share-add-shareid-length branch from 3dc8cdf to 18e3ce4 Compare November 24, 2024 14:09
Comment thread frontend/src/i18n/translations/en-US.ts Outdated
- Add share ID length to share > settings
- Use cryptographically secure RNG for IDs
- Use secure default value for IDs length
- Add FR and EN translation
@romainricard romainricard force-pushed the feat-share-add-shareid-length branch from 18e3ce4 to 73730af Compare November 24, 2024 14:26
@stonith404
Copy link
Copy Markdown
Owner

Now it looks good! Thanks for contributing to Pingvin Share :)

@stonith404 stonith404 merged commit 9d4bb55 into stonith404:main Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Extend (or let an admin specify the default) length of the randomly generated link ID of share links

2 participants