Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitelisting broken? - Failed to import - @sentry/astro #858

Open
Johannes-Andersen opened this issue Jul 26, 2024 · 3 comments
Open

Whitelisting broken? - Failed to import - @sentry/astro #858

Johannes-Andersen opened this issue Jul 26, 2024 · 3 comments
Labels
browser Not working in Browser

Comments

@Johannes-Andersen
Copy link

Johannes-Andersen commented Jul 26, 2024

Failing module

import Sentry from "https://www.vg.no/esm/@sentry/astro@8.20.0?target=es2020"

Error message

Package import: https://www.vg.no/esm/@sentry/astro@8.20.0?target=es2020

Resolves this:

/* esm.sh - @sentry/astro@8.20.0 */
import "/esm/esm/v135/@sentry/browser@8.20.0/es2020/browser.mjs";
import "/esm/esm/v135/@sentry/core@8.20.0/es2020/core.mjs";
export * from "/esm/v135/@sentry/astro@8.20.0/es2020/astro.mjs";

When the browser then tries to resolve those URLS, it fails (those with esm/esm)

Responds with 403 forbidden:
https://www.vg.no/esm/esm/v135/@sentry/browser@8.20.0/es2020/browser.mjs

Allow list is:
Screenshot 2024-07-26 at 17 37 03

Is this check failing due to not extracting the package name/scope correctly? Only happens for URLs that has the double esm/esm

if !pkgAllowed || pkgBanned {

Additional info

  • esm.sh version: v135_3
  • Browser version: Any
@Johannes-Andersen Johannes-Andersen added the browser Not working in Browser label Jul 26, 2024
@Johannes-Andersen Johannes-Andersen changed the title Whitelisting broken? - Failed to import -@sentry/astro Whitelisting broken? - Failed to import - @sentry/astro Jul 26, 2024
@ije
Copy link
Member

ije commented Jul 26, 2024

do you set basepath to esm/esm?

@ije
Copy link
Member

ije commented Jul 26, 2024

i see, thanks! i will look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Not working in Browser
Projects
None yet
Development

No branches or pull requests

2 participants