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

fix(gatsby): don't serve codeframes for files outside of compilation #38059

Merged
merged 2 commits into from May 5, 2023

Conversation

pieh
Copy link
Contributor

@pieh pieh commented May 5, 2023

Description

This adds additional checks before serving codeframes that are used in error overlay to avoid serving unintended content

Tests

Added test case ensuring we don't serve source files not related/used in current project

Related Issues

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 5, 2023
@pieh pieh added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 5, 2023
@pieh pieh marked this pull request as ready for review May 5, 2023 12:03
@pieh pieh merged commit ed5855e into master May 5, 2023
31 checks passed
@pieh pieh deleted the fix/serving-not-from-compilation branch May 5, 2023 12:03
@pieh pieh added this to To cherry-pick in V4 Release hotfixes via automation May 5, 2023
@pieh pieh added this to To cherry-pick in V5 Release hotfixes via automation May 5, 2023
pieh added a commit that referenced this pull request May 5, 2023
…38059)

* test: add test case for overlay handlers

* fix: don't serve codeframes for files outside of compilation

(cherry picked from commit ed5855e)
pieh added a commit that referenced this pull request May 5, 2023
…38059)

* test: add test case for overlay handlers

* fix: don't serve codeframes for files outside of compilation

(cherry picked from commit ed5855e)
@pieh pieh moved this from To cherry-pick to Backport PR opened in V5 Release hotfixes May 5, 2023
@pieh pieh moved this from To cherry-pick to Backport PR opened in V4 Release hotfixes May 5, 2023
pieh added a commit that referenced this pull request May 5, 2023
…38059) (#38062)

* test: add test case for overlay handlers

* fix: don't serve codeframes for files outside of compilation

(cherry picked from commit ed5855e)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
pieh added a commit that referenced this pull request May 5, 2023
…38059) (#38063)

* test: add test case for overlay handlers

* fix: don't serve codeframes for files outside of compilation

(cherry picked from commit ed5855e)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@pieh pieh moved this from Backport PR opened to Backported in V5 Release hotfixes May 5, 2023
@pieh pieh moved this from Backport PR opened to Backported in V4 Release hotfixes May 5, 2023
@pieh pieh moved this from Backported to Published in V4 Release hotfixes May 9, 2023
@pieh pieh moved this from Backported to Published in V5 Release hotfixes May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants