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: remove signed fetch origin & referer #2905

Closed
wants to merge 2 commits into from

Conversation

m3taphysics
Copy link
Collaborator

What does this PR change?

Whenever we attempt to set these values explicitly LIBCURL throws the following errors:

The header Origin is managed automatically, setting it may have no effect or result in unexpected behavior.
The header Referer is managed automatically, setting it may have no effect or result in unexpected behavior.

Digging deeper it was introduced due to a specific server side check here which effectively means we are forced to "spoof" the origin rather than let the library manage the origin itself (for security purposes).

No other endpoints should reject based on origin in this way, so it should be fixed server side to ensure the guestbook works in Goerli. The CORS policies should be setup server side to ensure security to avoid CSRF attacks and allow for localhost requests but not cross-origin.

How to test the changes?

  • Play happy paths
  • Ensure mini-games work as expected and the usual progress is saved

NOTE: Guestbook will no longer work

Our Code Review Standards

https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

Copy link
Collaborator

@dalkia dalkia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, while keeping in mind that we will lose that SDK scene support

@nearnshaw
Copy link
Member

I fear that this change will make us lose dozens of SDK scenes
I'm still unclear of what the gain is for doing this change

I think of that example scene as a canary in a coal mine. The checks that the server of that scene does for many years were shared as the best practice way to check the legitimacy of scene requests. I'm sure there are a lot of scenes out there that still employ the same checks

If we decide to merge this, which I'm not convinced, we need to plan clear communications and a rollout plan for it

@nearnshaw
Copy link
Member

We link that same example scene from the docs, amongst others that also do the same checks:

https://docs.decentraland.org/creator/development-guide/sdk7/authoritative-server/#example-scenes-with-dedicated-server

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.

4 participants