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

Server to Server: 7.0.0 Trusted_Domain and Error Messages #10064

Closed
MTRichards opened this issue Jul 30, 2014 · 10 comments · Fixed by #10889
Closed

Server to Server: 7.0.0 Trusted_Domain and Error Messages #10064

MTRichards opened this issue Jul 30, 2014 · 10 comments · Fixed by #10889

Comments

@MTRichards
Copy link
Contributor

When I log into ownCloud for the first time and set it up, and I do so from localhost, this is what is set in the config file for trusted_domains. Then, when I create a server-to-server share it generates a localhost URL, which obviously is no good for actual server-to-server sharing (See attachment).

localhost-share

If I edit the URL manually, replacing 'localhost' with the server's hostname 'studio', it generates an 'Error loading slideshow template' message. This message is not representative of the problem. The problem is that the trusted_domain config file entry needs to be edited to add the URL (in this case IP and / or host name) to resolve the problem.

The error message needs to be updated to be indicative of the problem, something like "untrusted host" or something, so the problem can be addressed by the admin.

@MTRichards MTRichards changed the title Server to Server: 7.0.0 Server to Server: 7.0.0 Trusted_Domain and Error Messages Jul 30, 2014
@MTRichards
Copy link
Contributor Author

@karlitschek @LukasReschke

@MTRichards MTRichards added this to the ownCloud 7.0.2 milestone Jul 30, 2014
@DeepDiver1975
Copy link
Member

@MTRichards this is by design of the trusted domain setting: you have to add all domains the instance can/shall be accessed from in the config.php

@craigpg craigpg modified the milestones: 2014-sprint-03-current, ownCloud 7.0.2 Sep 2, 2014
@craigpg craigpg added the Bug label Sep 2, 2014
@MTRichards
Copy link
Contributor Author

The error message needs to be updated to be indicative of the problem, something like "untrusted host" or something, so the problem can be addressed by the admin.

The issue is not that it does or doesn't work, but that the error message that is thrown is useless. It is not the slideshow template at all, rather the error message should be "untrusted host domain" or something like this.

@LukasReschke

@craigpg craigpg modified the milestones: 2014-sprint-04-next, 2014-sprint-03-current Sep 2, 2014
@karlitschek
Copy link
Contributor

hmm. not sure it is correct that the sharing link generation is using the trusted domain setting. We should have a separate setting for the current url. This also affects the notification emails. @nickvergessen
Maybe we can use the overwrite* setting or something new?

@nickvergessen
Copy link
Contributor

The existing overwrite* configs should already cover that.
They are (or should) be used for all generated links.

@MTRichards can you try the overwrite settings, see config.sample.php for help?

@MTRichards
Copy link
Contributor Author

Just to clarify.... because I can fix the problem by updating the trusted domain to include the IP of my server.

We just need an update to the error message so it says what the error is, and an admin can figure it out and solve it. Current message says

"'Error loading slideshow template"

It should say something like "Untrusted host" or something like that.

@LukasReschke
Copy link
Member

Mhm, I saw the message also in some other cases. I doubt this is related to that. I'll dive into this tomorrow.

@MTRichards
Copy link
Contributor Author

Thanks @LukasReschke !

LukasReschke added a commit that referenced this issue Sep 5, 2014
handleRequest() is not called from remote.php or public.php which made these files party available but all included apps in there produced errors.

As the expected behaviour is anyways that a trusted domain warning is shown I moved this to init()

Fixes #10064
@PVince81
Copy link
Contributor

PVince81 commented Sep 5, 2014

The "error loading slideshow" usually appears when there's any JS error happening that somehow impairs the slideshow app.

@LukasReschke
Copy link
Member

@PVince81 Yeah, in this case it was triggered by the reason that the gallery app was routed via index.php but the sharing via public.php

I fixed this error here with #10889 - feel free to review.

LukasReschke added a commit that referenced this issue Sep 5, 2014
handleRequest() is not called from remote.php or public.php which made these files party available but all included apps in there produced errors.

As the expected behaviour is anyways that a trusted domain warning is shown I moved this to init()

Fixes #10064
@lock lock bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants