Add servername in the output of status.php#26973
Add servername in the output of status.php#26973spattk wants to merge 1 commit intoowncloud:masterfrom
Conversation
|
fixes #26941 |
|
@siteshpattanaik001 Please fill the template as much as possible. This will help the reviewers and QA, and also it will help to understand why ownCloud should include your change. Thanks. |
|
@siteshpattanaik001 I guess you're Sitesh from IRC ? Great to see you managed to send the PR 😄 @DeepDiver1975 @PhilippSchaffrath @IljaN can you guys confirm that |
|
Yes sir, I am Sitesh from IRC. Thanx for all of your support.
…On Fri, Jan 20, 2017 at 3:18 AM, Vincent Petry ***@***.***> wrote:
@siteshpattanaik001 <https://github.com/siteshpattanaik001> I guess
you're Sitesh from IRC ? Great to see you managed to send the PR 😄
@DeepDiver1975 <https://github.com/DeepDiver1975> @PhilippSchaffrath
<https://github.com/PhilippSchaffrath> @IljaN <https://github.com/IljaN>
can you guys confirm that gethostname() is enough here ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26973 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMWfopvc3-ntwj-yhbrl5GTIWpZx6g-fks5rT9oggaJpZM4Ln5w8>
.
--
-Sitesh
|
|
I'm also wondering if there is a risk that this would reveal internal server names to the outside @Peter-Prochaska |
|
@PVince81 Why do we have status.php? Is it useful to populate the version string to all unauthenticated users and for what case do we need the hostname? |
|
I'll play the "bad guy" role this time....
Does it make sense to make this conditional since this seems to be useful for such environments? Kind of "enable this at your own risk". |
|
+1 for making this feature conditional. Default = false. And we should update the documentation that this feature should only be available from internal devices. |
|
@siteshpattanaik001 can you make this conditional ? Add a new value for config.php (and config.sample.php) that defaults to false. |
|
I guess, we don't need a config value. Just ripping off the domain of a server will be enough: and later.... |
|
I ll fix it on 28th of this month.
…On Thu, Feb 23, 2017 at 3:51 PM, Thomas ***@***.***> wrote:
I guess, we don't need a config value. Just ripping off the domain of a
server will be enough:
$servername = gethostname();
$position = strpos($servername, '.');
if ($position === false) {
$servershortname = $servername;
} else {
$servershortname = substr($servername, 0, $position);
}
and later....
'servername'=>$servershortname,
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26973 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMWfolVT3iC6OwZZSLwJ1axwv-MjQQH2ks5rfV29gaJpZM4Ln5w8>
.
--
-Sitesh
|
|
@GrendelWWU I'd rather not to expose unneeded information. This could be useful to debug big installations, and as such a config switch is fine. |
|
I understand, that exposing these information can be problematic for some installations. (known bugs in oc version x.y.z, ohh! what a shame, can lead to attacks) |
|
Note that we can't change the format because clients are relying on this. ownCloud is using json because clients can easily parse it: easy to use for the server, easy to parse in the client. At most, instead of individual switches we could provide a key in the config file to know what switchable components you want to be "on". The "problem" with this is that we only have one component (this new one) that can be there, and I don't think will add more in the near future. |
|
Ok, I didn't know, that the clients are examining status.php. I really thought about obfuscating some information (like oc version) via config.php or another mechanism. Know I think, this will be a very bad idea. |
|
Values in status.php moved into a method, see PR #27238. |
|
Any update ? |
|
closing due to lack of activity. If anyone wants to pick it up feel free to reopen or submit another PR |
|
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. |
Description
With the help of gethostname(), the name of server can be fetched.
Related Issue
Motivation and Context
This hels to add one more value to the status when somebody wants to know more about the owncloud-server.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: