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

"Add trusted domains" button doesn't work #14320

Closed
SergioBertolinSG opened this issue Feb 18, 2015 · 17 comments · Fixed by #14324
Closed

"Add trusted domains" button doesn't work #14320

SergioBertolinSG opened this issue Feb 18, 2015 · 17 comments · Fixed by #14324

Comments

@SergioBertolinSG
Copy link
Contributor

Steps to reproduce

Having prepared an owncloud configuration:

  1. Configure owncloud from localhost .
  2. Try to access owncloud from another ip different to localhost.

Expected behaviour

Owncloud shows a "add to trusted domains" suggestion with a button that adds that ip to trusted domains.

Actual behaviour

Message and button are shown, but nothing happens after clicking the button.

screen shot 2015-02-18 at 10 04 25

Server configuration

Operating system:
Ubuntu 14.04 LTS

Web server:
Apache

Database:
MySQL

PHP version:
5.5.9

ownCloud version: (see ownCloud admin page)
"version":"8.0.0.9,"versionstring":"8.0","edition":"Community"

Updated from an older ownCloud or fresh install:
fresh

List of activated apps:
none

The content of config/config.php:


Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: no

Client configuration

Chrome, Firefox.

@karlitschek
Copy link
Contributor

@LukasReschke can you have a look?

@ghost
Copy link

ghost commented Feb 18, 2015

@SergioBertolinSG
Have a look at the JavaScript console of your browser and the data/owncloud.log when clicking on the button to see if you're getting any errors.

@SergioBertolinSG
Copy link
Contributor Author

There is an error while getting this file
GET http://10.40.40.130/owncloud_18-02-15/core/vendor/jquery/dist/jquery-migrate.min.map 404 (Not Found)

@ghost
Copy link

ghost commented Feb 18, 2015

Hi,

this message itself is a duplicate of #14057

Not quite sure if this is causing your problem.

@LukasReschke
Copy link
Member

Message is unrelated. That's just some browser debugging feature. Let me look at this.

@LukasReschke LukasReschke self-assigned this Feb 18, 2015
@SergioBertolinSG
Copy link
Contributor Author

Ok, that javascript was unrelated. There weren't more javascript errors.

While clicking the button, an error message about web not available shows., showing this on networking.

GET http://owncloud_18-02-15/index.php/settings/admin?trustDomain=10.40.40.130 net::ERR_NAME_NOT_RESOLVED
http://owncloud_18-02-15/index.php/settings/admin?trustDomain=10.40.40.130:1 GET http://owncloud_18-02-15/index.php/settings/admin?trustDomain=10.40.40.130 net::ERR_NAME_NOT_RESOLVED

@LukasReschke
Copy link
Member

Can you post your config?

@SergioBertolinSG
Copy link
Contributor Author

Well, it is a new installation, coming from #14321. But i saw this all the time before, this button has never worked. I always had to edit config.php to add the trusted domain manually.

@LukasReschke
Copy link
Member

It actually should work fine if the instance is configured properly and both addresses are accessible.

The question here is more how we come into this inconsistent state:

  1. How did you setup the ownCloud instance? Via Web or via CLI?
  2. Was there any configured trusted domain in the config or was this an empty array or not existing key?

@SergioBertolinSG
Copy link
Contributor Author

I didn't setup owncloud yet this time.

Previous times I had a oc installed via web with only localhost in the array of trusted domains.

@LukasReschke
Copy link
Member

Got it… On it… Nice catch!!!

LukasReschke added a commit that referenced this issue Feb 18, 2015
Due to a security hardening in 8.1 a missing value of empty trusted domains in the config would provoke an error as this was misused by a lot of users.

This caused a problem where the initial installation happened from another domain than 127.0.0.1 as in this case the domain was considered untrusted as no value was defined. However, this special case should not get intercepted.

To test:
- [ ] Installing ownCloud on 127.0.0.1 works
- [ ] Installing ownCloud on another domain / IP works
- [ ] When setting up ownCloud from 127.0.0.1 and accessing it from the domain above the trusted domain error should be shown if not specified in the config

Fixes #14320
@LukasReschke
Copy link
Member

That was a nasty one caused by a security hardening for 8.1. - Patch is at #14324

@SergioBertolinSG
Copy link
Contributor Author

Opened #14332.
Clarified in #14324

@SamuAlfageme SamuAlfageme reopened this Feb 1, 2018
@SamuAlfageme SamuAlfageme changed the title Add ip to trusted domains button doesn't work "Add trusted domains" button doesn't work Feb 1, 2018
@SamuAlfageme
Copy link

Reopening as still relevant based in https://stackoverflow.com/questions/37974876 not sure, though, if it's a collateral of #14332 (when the installation does not have access to said new trusted domain - like it happens when running ownCloud inside a container and trying to access via the host address)

@DeepDiver1975
Copy link
Member

that button was removed because of sec reasons some time back -> close and bye-bye

@SamuAlfageme
Copy link

SamuAlfageme commented Feb 1, 2018

@DeepDiver1975 you're right; didn't see a7b2d12 - 👌 then

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 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.

5 participants