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

OCS/config values are hardcoded #31355

Open
SamuAlfageme opened this issue May 4, 2018 · 4 comments
Open

OCS/config values are hardcoded #31355

SamuAlfageme opened this issue May 4, 2018 · 4 comments

Comments

@SamuAlfageme
Copy link

I was looking around the OCS API once again and noticed:

public static function apiConfig() {
$xml['version'] = '1.7';
$xml['website'] = 'ownCloud';
$xml['host'] = \OCP\Util::getServerHost();
$xml['contact'] = '';
$xml['ssl'] = 'false';
return new Result($xml);
}

... this causes some hardcoded values to be returned on the ocs/config endpoint:

$ curl -X GET 'http://localhost/ocs/v1.php/config?format=json' -u 'admin:admin'

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": null
        },
        "data": {
            "version": "1.7",
            "website": "ownCloud",
            "host": "localhost",
            "contact": "",
            "ssl": "false"
        }
    }
}

I guess:

  • website - specially for branded versions.
  • contact
  • ssl

... should also be dynamically generated from e.g. config.php.

@DeepDiver1975
Copy link
Member

The whole Route can be removed

@SamuAlfageme
Copy link
Author

@DeepDiver1975 sync client relies on this route for owncloud/client@b0f986c#diff-25fa7af0e8c67974874ead6e9eb2d29c (i.e. if overwritehost was set) - do we have an alternative for this?

@DeepDiver1975
Copy link
Member

🧚

@individual-it
Copy link
Member

related to #34664 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants