Skip to content

Fix embed URL for password-protected links and locale subdomains - #8

Open
N0Arxan wants to merge 1 commit into
fullstackusama:mainfrom
N0Arxan:fix/embed-secret-password-and-subdomain
Open

Fix embed URL for password-protected links and locale subdomains#8
N0Arxan wants to merge 1 commit into
fullstackusama:mainfrom
N0Arxan:fix/embed-secret-password-and-subdomain

Conversation

@N0Arxan

@N0Arxan N0Arxan commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Preserve the secret_password query parameter when building the embed URL, so privately-shared/password-protected Scribd documents export correctly instead of failing with "No printable document pages were detected."
  • Match any *.scribd.com subdomain (e.g. es.scribd.com), not just www.scribd.com.

Test plan

  • Ran the script against a password-protected www.scribd.com/document/.../...?secret_password=... link and confirmed the embed URL retains the password and the PDF exports successfully (80/80 pages).
  • Verified es.scribd.com document links now convert to a valid embed URL.

Password-protected/private Scribd links carry a secret_password query
param and can use locale subdomains (e.g. es.scribd.com). The embed URL
builder was dropping the password and only matching www.scribd.com,
causing "No printable document pages were detected" for these links.
@fullstackusama

Copy link
Copy Markdown
Owner

Thanks for the contribution. Supporting locale subdomains and password-protected shared links is useful.

Before merging, could you please address these points?

  1. The hostname regex currently accepts unrelated domains such as notscribd.com and evil-scribd.com. Please parse the URL and accept only scribd.com or hostnames ending exactly in .scribd.com.
  2. Preserving secret_password causes the complete secret-bearing embed URL to be printed by print(f"Link embed: {converted_url}"). Please redact or omit the query string in terminal output.
  3. Please use parse_qs() or parse_qsl() for extracting secret_password instead of parsing the query with a regex.
  4. Please add tests covering www.scribd.com, locale subdomains, encoded passwords, and rejection of lookalike domains.

The overall feature looks good, and the PR is otherwise small and mergeable. Once these security and validation concerns are addressed, I’d be happy to reconsider it.

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.

2 participants