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

Make sure /app/new takes target as absolute path #2305

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

glpatcern
Copy link
Member

A mini-PR to make the target parameter absolute (by prepending / if missing).

The real issue here is that a relative target seems to make the gateway fail to identify a storage provider, and the InitiateFileUpload request fails with CODE_INTERNAL. And the web frontend happened to send requests with relative paths.

Independently from fixing the web frontend, this patch protects the app provider.

@update-docs
Copy link

update-docs bot commented Nov 25, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@wkloucek
Copy link
Contributor

@ishank011 @glpatcern can we go forward with #2210? It should also fix this problem

@@ -153,6 +153,13 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
return
}

// TODO(lopresti) if target is relative, currently the gateway fails to identify a storage provider (?)
Copy link
Contributor

Choose a reason for hiding this comment

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

We do support relative references but I don’t know if web can work with those

For now, it’s good enough

@ishank011 ishank011 merged commit db635ef into cs3org:master Nov 26, 2021
thmour pushed a commit to thmour/reva that referenced this pull request Nov 26, 2021
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.

3 participants