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] Prevent storing external urls for stores #3208

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Nov 5, 2023

This PR fixes #3200

We now store the last url visited when navigating the stores, but we can store external urls and then there's no way to go back to the store.

With this PR we now only store urls that are allowed instead of storing everything. And in case a user already has an invalid url stored, we now also check to only re-open in the url if it's one of the allowed.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Nov 5, 2023
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team November 5, 2023 15:04
@CommandMC
Copy link
Collaborator

Storing the URLs inside sessionStorage instead might be safer. They don't have to persist between restarts, right?

@arielj
Copy link
Collaborator Author

arielj commented Nov 6, 2023

Storing the URLs inside sessionStorage instead might be safer. They don't have to persist between restarts, right?

I meant this to be stored between restarts, I didn't think about making it not persistent. Not sure what users will expect though.

I guess we can wait for feedback. In the issue I was fixing with that feature both tings were mentioned: storing between restarts as not necessary and also as someone mentioned to support that after restarts, so I don't know haha.

@flavioislima
Copy link
Member

I vote for it to NOT be persistent across restarts.
It could be safer in case something goes wrong during the navigation.

@imLinguin
Copy link
Member

I agree, there is no need for that to be persistent across restarts. I think it's even nicer for UX

@arielj
Copy link
Collaborator Author

arielj commented Nov 17, 2023

changed it to use sessionStorage

@flavioislima flavioislima merged commit b95abc8 into main Nov 21, 2023
13 checks passed
@flavioislima flavioislima deleted the saved-store-url-fix branch November 21, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When opening a store, if the saved url is external to the store we can't go back to the store
5 participants