Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jun 14, 2024
1 parent abd4b41 commit de3e23e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 4 additions & 4 deletions backend/src/services/secret-sharing/secret-sharing-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export const secretSharingServiceFactory = ({
const currentTime = new Date().getTime();
const thirtyDays = 30 * 24 * 60 * 60 * 1000;
if (expiryTime - currentTime > thirtyDays) {
throw new BadRequestError({ message: "Expiration date cannot be more than 30 days currently." });
throw new BadRequestError({ message: "Expiration date cannot be more than 30 days" });
}

// Limit Input ciphertext length to 13000 (equivalent to 10,000 characters of Plaintext)
if (encryptedValue.length > 13000) {
throw new BadRequestError({ message: "Shared Secret Value too long" });
throw new BadRequestError({ message: "Shared secret value too long" });
}

const newSharedSecret = await secretSharingDAL.create({
Expand All @@ -78,12 +78,12 @@ export const secretSharingServiceFactory = ({
const currentTime = new Date().getTime();
const thirtyDays = 30 * 24 * 60 * 60 * 1000;
if (expiryTime - currentTime > thirtyDays) {
throw new BadRequestError({ message: "Expiration date cannot be more than 30 days currently." });
throw new BadRequestError({ message: "Expiration date cannot exceed more than 30 days" });
}

// Limit Input ciphertext length to 13000 (equivalent to 10,000 characters of Plaintext)
if (encryptedValue.length > 13000) {
throw new BadRequestError({ message: "Shared Secret Value too long" });
throw new BadRequestError({ message: "Shared secret value too long" });
}

const newSharedSecret = await secretSharingDAL.create({
Expand Down
6 changes: 0 additions & 6 deletions docs/documentation/platform/secret-sharing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ Infisical offers a secure solution for sharing secrets over the internet in a ti

With its zero-knowledge architecture, secrets shared via Infisical remain unreadable even to Infisical itself.

<Note>
Secret Sharing is available publicly as well as from the Infisical dashboard.
If you're signed in, you can access all your shared secrets and their expiry
details.
</Note>

## Share a Secret

1. Navigate to the **Organization** page.
Expand Down

0 comments on commit de3e23e

Please sign in to comment.