diff --git a/src/components/shortcodes/ProtectedContent.astro b/src/components/shortcodes/ProtectedContent.astro index 1ab737d..b6c384a 100644 --- a/src/components/shortcodes/ProtectedContent.astro +++ b/src/components/shortcodes/ProtectedContent.astro @@ -9,7 +9,7 @@ interface Props { const { password: propPassword, pwEnv } = Astro.props; // Get password from props, environment variable, or site config -const password = (pwEnv ? import.meta.env[pwEnv] : propPassword) || siteConfig.contentPassword || import.meta.env.CONTENT_PASSWORD || Math.random().toString(); +const password = (pwEnv ? import.meta.env[pwEnv] : propPassword) || siteConfig.contentPassword || import.meta.env.CONTENT_PASSWORD; // Get the slot content const content = await Astro.slots.render('default'); @@ -21,28 +21,30 @@ const { encryptedData, iv } = encrypt(content, password);
This content is protected. Enter the password to view it:
-